remove wxMSW-specific FindSuitableParent() and use GetParentForModalDialog() everywhere; extend it with additional checks and remove redundant ones elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -111,16 +111,11 @@ int wxDialog::ShowModal()
|
||||
if ( win )
|
||||
win->GTKReleaseMouseAndNotify();
|
||||
|
||||
// use the apps top level window as parent if none given unless explicitly
|
||||
// forbidden
|
||||
if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) )
|
||||
wxWindow * const parent = GetParentForModalDialog();
|
||||
if ( parent )
|
||||
{
|
||||
wxWindow * const parent = GetParentForModalDialog();
|
||||
if ( parent && parent != this )
|
||||
{
|
||||
gtk_window_set_transient_for( GTK_WINDOW(m_widget),
|
||||
GTK_WINDOW(parent->m_widget) );
|
||||
}
|
||||
gtk_window_set_transient_for( GTK_WINDOW(m_widget),
|
||||
GTK_WINDOW(parent->m_widget) );
|
||||
}
|
||||
|
||||
wxBusyCursorSuspender cs; // temporarily suppress the busy cursor
|
||||
|
Reference in New Issue
Block a user