X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2d93e735a9f126b855a9353ca8ddeacaaf52817..5adad46628e545a6d4172ecf3a0cb848934f5cd0:/src/gtk/dialog.cpp?ds=inline diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index b52338cef1..a4532f5d19 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -632,7 +632,9 @@ int wxDialog::ShowModal() return GetReturnCode(); } - if ( !GetParent() ) + // use the apps top level window as parent if none given unless explicitly + // forbidden + if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) ) { wxWindow *parent = wxTheApp->GetTopWindow(); if ( parent && parent != this )