X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d52ded25c12f0a2e705d7d632dc5050287586475..a68fb3fc385b9cbb3c66cb321887854a5224688f:/src/osx/cocoa/nonownedwnd.mm?ds=sidebyside diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index 1d5475532b..7f73ffed91 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -111,7 +111,7 @@ bool shouldHandleSelector(SEL selector) return (wxNonOwnedWindowCocoaImpl*) wxNonOwnedWindowImpl::FindFromWXWindow( self ); } -// TODO in cocoa everything during a drag is sent to the NSWindow the mouse down occured, +// TODO in cocoa everything during a drag is sent to the NSWindow the mouse down occurred, // this does not conform to the wx behaviour if the window is not captured, so try to resend // or capture all wx mouse event handling at the tlw as we did for carbon @@ -688,7 +688,8 @@ bool wxNonOwnedWindowCocoaImpl::Show(bool show) if ( wxpeer ) { // add to parent window before showing - if ( wxpeer->GetParent() ) + wxDialog * const dialog = wxDynamicCast(wxpeer, wxDialog); + if ( wxpeer->GetParent() && dialog && dialog->IsModal()) { NSView * parentView = wxpeer->GetParent()->GetPeer()->GetWXWidget(); if ( parentView )