]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
fixes to the sizers behaviour necessary to make the log dialog work again
[wxWidgets.git] / src / common / wincmn.cpp
index 65fdad6ae3053458280df79c5f4a0fe835e11315..1d70eebd623700259a1b7957126e362d4f45072b 100644 (file)
@@ -364,6 +364,17 @@ void wxWindowBase::Centre(int direction)
             }
         }
 
+        // we shouldn't center the dialog on the iconized window: under
+        // Windows, for example, this places it completely off the screen
+        if ( parent )
+        {
+            wxTopLevelWindow *winTop = wxDynamicCast(parent, wxTopLevelWindow);
+            if ( winTop && winTop->IsIconized() )
+            {
+                parent = NULL;
+            }
+        }
+
         // did we find the parent?
         if ( !parent )
         {
@@ -1960,7 +1971,7 @@ void wxWindowBase::ReleaseMouse()
 {
     wxLogTrace(_T("mousecapture"), _T("ReleaseMouse(0x%08x)"), this);
 
-    wxASSERT_MSG( GetCapture() == this, wxT("attempt to release mouse, but this window hasn't captured it") )
+    wxASSERT_MSG( GetCapture() == this, wxT("attempt to release mouse, but this window hasn't captured it") );
 
     DoReleaseMouse();