From 72fa862b0430bf0f4babeb392555e79e02fc8378 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 15 Sep 2001 22:13:20 +0000 Subject: [PATCH] wxMGL update git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mgl/app.cpp | 6 ------ src/mgl/window.cpp | 12 ++++++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/mgl/app.cpp b/src/mgl/app.cpp index 2027810bd5..c5535f75c8 100644 --- a/src/mgl/app.cpp +++ b/src/mgl/app.cpp @@ -74,8 +74,6 @@ bool wxYield() while (wxEventLoop::GetActive()->Pending()) wxEventLoop::GetActive()->Dispatch(); } - else - MGL_wmUpdateDC(g_winMng); // FIXME_MGL -- temporary hack, please remove /* it's necessary to call ProcessIdle() to update the frames sizes which might have been changed (it also will update other things set from @@ -209,12 +207,8 @@ bool wxApp::SendIdleEvents(wxWindow* win) win->GetEventHandler()->ProcessEvent(event); -#if 0 // FIXME_MGL - what the hell it is? - win->OnInternalIdle(); - if ( event.MoreRequested() ) needMore = TRUE; -#endif wxNode* node = win->GetChildren().First(); while (node) diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 7e63e26d4b..61e992901f 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -166,7 +166,7 @@ void wxDestroyMGL_WM() static void wxWindowPainter(window_t *wnd, MGLDC *dc) { wxWindowMGL *w = (wxWindow*) wnd->userData; - if (w) + if (w && !(w->GetStyle() & wxTRANSPARENT_WINDOW)) { MGLDevCtx ctx(dc); w->HandlePaint(&ctx); @@ -396,7 +396,6 @@ static ibool wxWindowKeybHandler(window_t *wnd, event_t *e) event.m_scanCode = 0; // not used by wx at all event.m_x = where.x; event.m_y = where.y; - wxLogDebug("key pressed, x=%i y=%i", event.m_x, event.m_y); // FIXME_MGL -remove event.m_shiftDown = e->modifiers & EVT_SHIFTKEY; event.m_controlDown = e->modifiers & EVT_CTRLSTATE; event.m_altDown = e->modifiers & EVT_LEFTALT; @@ -537,11 +536,18 @@ bool wxWindowMGL::Create(wxWindow *parent, y = 0; // FIXME_MGL, something better, see GTK+ w = WidthDefault(size.x); h = HeightDefault(size.y); + + long mgl_style = 0; + if ( !(style & wxNO_FULL_REPAINT_ON_RESIZE) ) + mgl_style |= MGL_WM_FULL_REPAINT_ON_RESIZE; + if ( style & wxSTAY_ON_TOP ) + mgl_style |= MGL_WM_ALWAYS_ON_TOP; m_wnd = MGL_wmCreateWindow(g_winMng, parent ? parent->GetHandle() : NULL, x, y, w, h); + MGL_wmSetWindowFlags(m_wnd, mgl_style); MGL_wmSetWindowUserData(m_wnd, (void*) this); MGL_wmSetWindowPainter(m_wnd, wxWindowPainter); MGL_wmShowWindow(m_wnd, m_isShown); @@ -675,8 +681,6 @@ bool wxWindowMGL::SetCursor(const wxCursor& cursor) MGL_wmSetWindowCursor(m_wnd, *m_cursor.GetMGLCursor()); else MGL_wmSetWindowCursor(m_wnd, *wxSTANDARD_CURSOR->GetMGLCursor()); - - // FIXME_MGL -- should it set children's cursor or not?! return TRUE; } -- 2.45.2