diff --git a/pcsx2/gui/App.h b/pcsx2/gui/App.h index 14fd9cadff..c8a2d7174d 100644 --- a/pcsx2/gui/App.h +++ b/pcsx2/gui/App.h @@ -120,6 +120,12 @@ enum MenuIdentifiers }; ////////////////////////////////////////////////////////////////////////////////////////// +// ScopedWindowDisable +// +// This class is a fix helper for WXGTK ports of PCSX2, which need the current window to +// be disabled in order for plugin-created modal dialogs to receive messages. This disabling +// causes problems in Win32/MSW, where some plugins' modal dialogs will cause all PCSX2 +// windows to minimize on closure. // class ScopedWindowDisable { @@ -132,13 +138,18 @@ public: ScopedWindowDisable( wxWindow* whee ) : m_window( *whee ) { + #ifdef __WXGTK__ wxASSERT( whee != NULL ); m_window.Disable(); + #endif } ~ScopedWindowDisable() { +#ifdef __WXGTK__ m_window.Enable(); + m_window.SetFocus(); +#endif } }; diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index 612136f213..28875379da 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -365,7 +365,7 @@ void Panels::PluginSelectorPanel::OnConfigure_Clicked( wxCommandEvent& evt ) wxDynamicLibrary dynlib( (*m_FileList)[(int)m_ComponentBoxes.Get(pid).GetClientData(sel)] ); if( PluginConfigureFnptr configfunc = (PluginConfigureFnptr)dynlib.GetSymbol( tbl_PluginInfo[pid].GetShortname() + L"configure" ) ) { - //ScopedWindowDisable disabler( wxGetTopLevelParent( this ) ); + ScopedWindowDisable disabler( wxGetTopLevelParent( this ) ); configfunc(); } }