minor wxMGL fixes -- controls sample is now OK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-10-28 23:25:35 +00:00
parent 0b7a8cd392
commit f41ed3c442
7 changed files with 27 additions and 6 deletions

View File

@@ -71,16 +71,19 @@ protected:
void Init(); void Init();
wxString m_title; wxString m_title;
bool m_fsIsShowing; /* full screen */ bool m_fsIsShowing:1; /* full screen */
long m_fsSaveStyle; long m_fsSaveStyle;
long m_fsSaveFlag; long m_fsSaveFlag;
wxRect m_fsSaveFrame; wxRect m_fsSaveFrame;
// is the frame currently iconized? // is the frame currently iconized?
bool m_isIconized; bool m_isIconized:1;
// and maximized? // and maximized?
bool m_isMaximized; bool m_isMaximized:1;
wxRect m_savedFrame; wxRect m_savedFrame;
// did we sent wxSizeEvent at least once?
bool m_sizeSet:1;
}; };
#endif // __WX_TOPLEVEL_H__ #endif // __WX_TOPLEVEL_H__

View File

@@ -111,8 +111,8 @@ protected:
struct window_t *m_wnd; struct window_t *m_wnd;
// whether there should be wxEraseEvent before wxPaintEvent or not // whether there should be wxEraseEvent before wxPaintEvent or not
// (see wxWindow::Refresh) // (see wxWindow::Refresh)
bool m_frozen; bool m_frozen:1;
bool m_refreshAfterThaw; bool m_refreshAfterThaw:1;
int m_eraseBackground; int m_eraseBackground;
// implement the base class pure virtuals // implement the base class pure virtuals

View File

@@ -15,6 +15,7 @@
#if wxUSE_CLIPBOARD #if wxUSE_CLIPBOARD
// FIXME_MGL
IMPLEMENT_DYNAMIC_CLASS(wxClipboard,wxObject) IMPLEMENT_DYNAMIC_CLASS(wxClipboard,wxObject)

View File

@@ -152,6 +152,10 @@ void wxEventLoop::Exit(int rc)
m_impl->SetExitCode(rc); m_impl->SetExitCode(rc);
m_impl->SetKeepLooping(FALSE); m_impl->SetKeepLooping(FALSE);
// Send a dummy event so that the app won't block in EVT_halt if there
// are no user-generated events in the queue:
EVT_post(0, EVT_USEREVT, 0, 0);
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -21,3 +21,4 @@
IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject) IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject)
// FIXME_MGL

View File

@@ -55,6 +55,7 @@ void wxTopLevelWindowMGL::Init()
m_isIconized = FALSE; m_isIconized = FALSE;
m_isMaximized = FALSE; m_isMaximized = FALSE;
m_fsIsShowing = FALSE; m_fsIsShowing = FALSE;
m_sizeSet = FALSE;
} }
bool wxTopLevelWindowMGL::Create(wxWindow *parent, bool wxTopLevelWindowMGL::Create(wxWindow *parent,
@@ -140,6 +141,17 @@ bool wxTopLevelWindowMGL::ShowFullScreen(bool show, long style)
bool wxTopLevelWindowMGL::Show(bool show) bool wxTopLevelWindowMGL::Show(bool show)
{ {
bool ret = wxTopLevelWindowBase::Show(show); bool ret = wxTopLevelWindowBase::Show(show);
// If this is the first time Show was called, send size event,
// so that the frame can adjust itself (think auto layout or single child)
if ( !m_sizeSet )
{
m_sizeSet = TRUE;
wxSizeEvent event(GetSize(), GetId());
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
}
if ( ret && show && AcceptsFocus() ) if ( ret && show && AcceptsFocus() )
SetFocus(); SetFocus();
// FIXME_MGL -- don't do this for popup windows? // FIXME_MGL -- don't do this for popup windows?

View File

@@ -1129,7 +1129,7 @@ void wxWindowMGL::HandlePaint(MGLDevCtx *dc)
#if 0 // FIXME_MGL -- debugging stuff! #if 0 // FIXME_MGL -- debugging stuff!
dc->setColorRGB(255,0,255); dc->setColorRGB(255,0,255);
dc->fillRect(-1000,-1000,2000,2000); dc->fillRect(-1000,-1000,2000,2000);
wxUsleep(100); wxUsleep(50);
#endif #endif
MGLRegion clip; MGLRegion clip;