From 2fa4a0be4ecd4169aa655f296733fe6ca99048e2 Mon Sep 17 00:00:00 2001 From: John Roberts Date: Tue, 23 Feb 2016 00:09:12 +0100 Subject: [PATCH] Fix Z-order after showing modal dialog in wxOSX Explicitly bring the parent to top when hiding a modal dialog, this doesn't seem to do any harm and it fixes a very annoying regression with bringing the application frame, and not the dialog parent, if it's different, to the top of Z-order after dismissing the dialog. Closes #16204. --- src/osx/dialog_osx.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osx/dialog_osx.cpp b/src/osx/dialog_osx.cpp index fe870deaed..750e6a2059 100644 --- a/src/osx/dialog_osx.cpp +++ b/src/osx/dialog_osx.cpp @@ -178,5 +178,9 @@ void wxDialog::EndModal(int retCode) SetReturnCode(retCode); Show(false); + + // Prevent app frame from taking z-order precedence + if( GetParent() ) + GetParent()->Raise(); }