From 5465a788c80d09ba276d2f8389d95322ff2a33b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 9 Feb 2002 23:29:30 +0000 Subject: [PATCH] fixes to wxTLW::Maximize in wxMGL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mgl/toplevel.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mgl/toplevel.cpp b/src/mgl/toplevel.cpp index d02dac8c3e..c70e6f3865 100644 --- a/src/mgl/toplevel.cpp +++ b/src/mgl/toplevel.cpp @@ -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 ) -- 2.49.0