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
This commit is contained in:
Jake.Stine 2009-09-09 04:46:15 +00:00
parent a526e57848
commit 46f3973031
2 changed files with 12 additions and 1 deletions

View File

@ -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
}
};

View File

@ -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();
}
}