]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes to wxTLW::Maximize in wxMGL
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 9 Feb 2002 23:29:30 +0000 (23:29 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 9 Feb 2002 23:29:30 +0000 (23:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mgl/toplevel.cpp

index d02dac8c3e8593fbb3859b35b4962a1f814893aa..c70e6f3865e4942d613403029cb05c2e9d79c68c 100644 (file)
@@ -29,6 +29,7 @@
 #include "wx/defs.h"
 #include "wx/toplevel.h"
 #include "wx/app.h"
+#include "wx/mgl/private.h"
 
 // ----------------------------------------------------------------------------
 // idle system
@@ -159,16 +160,19 @@ bool wxTopLevelWindowMGL::Show(bool show)
 
 void wxTopLevelWindowMGL::Maximize(bool maximize)
 {
+    int x, y, w, h;
+    wxClientDisplayRect(&x, &y, &w, &h);
+
+    rect_t screenRect = MGL_defRect(x, y, w, h);
+    MGL_wmInvalidateRect(g_winMng, &screenRect);
+
     if ( maximize && !m_isMaximized )
     {
-        int x, y, w, h;
-        
         m_isMaximized = TRUE;
 
         GetPosition(&m_savedFrame.x, &m_savedFrame.y);
         GetSize(&m_savedFrame.width, &m_savedFrame.height);
 
-        wxClientDisplayRect(&x, &y, &w, &h);
         SetSize(x, y, w, h);
     }
     else if ( !maximize && m_isMaximized )