]> git.saurik.com Git - wxWidgets.git/commitdiff
follow up parent chain to properly support modal dialog parents, see #15383
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 5 Aug 2013 08:59:38 +0000 (08:59 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 5 Aug 2013 08:59:38 +0000 (08:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/nonownedwnd.mm

index 279e45f30a351bef3b924b08645e6bebceb7440b..9e79c6a458e45b250d746b9802a6b8d1d242ea57 100644 (file)
@@ -658,7 +658,7 @@ long style, long extraStyle, const wxString& WXUNUSED(name) )
     // If the parent is modal, windows with wxFRAME_FLOAT_ON_PARENT style need
     // to be in kCGUtilityWindowLevel and not kCGFloatingWindowLevel to stay
     // above the parent.
-    wxDialog * const parentDialog = wxDynamicCast(parent, wxDialog);
+    wxDialog * const parentDialog = parent == NULL ? NULL : wxDynamicCast(parent->MacGetTopLevelWindow(), wxDialog);
     if (parentDialog && parentDialog->IsModal())
     {
         if (level == kCGFloatingWindowLevel)