]> git.saurik.com Git - wxWidgets.git/commitdiff
fix positioning bug with window disabler and hidden windows
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 6 Mar 2011 14:49:19 +0000 (14:49 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 6 Mar 2011 14:49:19 +0000 (14:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/evtloop.mm

index e558a54e255f58bd6e49db7b1ad3c1c952068429..08e690cbf4cd6bfde4e56f0473a28324e06ff91e 100644 (file)
@@ -307,6 +307,11 @@ void wxGUIEventLoop::BeginModalSession( wxWindow* modalWindow )
     
     if ( modalWindow )
     {
+        // we must show now, otherwise beginModalSessionForWindow does it but it
+        // also would do a centering of the window before overriding all our position
+        if ( !modalWindow->IsShownOnScreen() )
+            modalWindow->Show();
+        
         wxNonOwnedWindow* now = dynamic_cast<wxNonOwnedWindow*> (modalWindow);
         wxASSERT_MSG( now != NULL, "must pass in a toplevel window for modal event loop" );
         nsnow = now ? now->GetWXWindow() : nil;