fixes to wxTLW::Maximize in wxMGL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2002-02-09 23:29:30 +00:00
parent 768f0c5a2c
commit 5465a788c8

View 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 )