From 46f3973031c6435599bd454cc437c9ba81927806 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Wed, 9 Sep 2009 04:46:15 +0000 Subject: [PATCH] Fix for GSdx's config panel making PCSX2 minimize itself. (also revert accidental linux config panel breakage) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1794 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/App.h | 11 +++++++++++ pcsx2/gui/Panels/PluginSelectorPanel.cpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) 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(); } }