From 32f11001c039fd0de254be6c68f7c036389b9250 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 6 Apr 2015 18:49:19 +0200 Subject: MacOSX: solve issue volumes not auto-dismounting when quitting VeraCrypt. restore main VeraCrypt window if is in background when we need to display various dialogs --- src/Main/Forms/MainFrame.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/Main/Forms/MainFrame.h') diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h index d2c6ea51..224785c2 100644 --- a/src/Main/Forms/MainFrame.h +++ b/src/Main/Forms/MainFrame.h @@ -67,6 +67,7 @@ namespace VeraCrypt void MountAllFavorites (); void MountVolume (); void OnAboutMenuItemSelected (wxCommandEvent& event); + void OnQuit(wxCommandEvent& event) { Close(true); } void OnActivate (wxActivateEvent& event); void OnAddAllMountedToFavoritesMenuItemSelected (wxCommandEvent& event); void OnAddToFavoritesMenuItemSelected (wxCommandEvent& event); @@ -82,7 +83,14 @@ namespace VeraCrypt void OnCloseAllSecurityTokenSessionsMenuItemSelected (wxCommandEvent& event); void OnDonateMenuItemSelected (wxCommandEvent& event) { Gui->OpenHomepageLink (this, L"donate"); } void OnContactMenuItemSelected (wxCommandEvent& event) { Gui->OpenHomepageLink (this, L"contact"); } - void OnCreateKeyfileMenuItemSelected (wxCommandEvent& event) { Gui->CreateKeyfile(); } + void OnCreateKeyfileMenuItemSelected (wxCommandEvent& event) + { +#ifdef TC_MACOSX + if (Gui->IsInBackgroundMode()) + Gui->SetBackgroundMode (false); +#endif + Gui->CreateKeyfile(); + } void OnCreateVolumeButtonClick (wxCommandEvent& event); void OnDefaultKeyfilesMenuItemSelected (wxCommandEvent& event); void OnDefaultMountParametersMenuItemSelected( wxCommandEvent& event ); -- cgit v1.2.3