X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11f104e5c1ab197246f93ed6eaa1f4e187096a3d..848c37c35b42e3e18e98a578f794172b8f2c46d0:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 6bd5ca66fb..422745e451 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -28,7 +28,6 @@ #include "wx/msw/wrapwin.h" #include "wx/window.h" #include "wx/accel.h" - #include "wx/setup.h" #include "wx/menu.h" #include "wx/dc.h" #include "wx/dcclient.h" @@ -121,7 +120,11 @@ // resizing complicated window hierarchies, but this can in theory result in // different behaviour than the old code so we keep the possibility to use it // by setting this to 0 (in the future this should be removed completely) +#ifdef __WXWINCE__ +#define USE_DEFERRED_SIZING 0 +#else #define USE_DEFERRED_SIZING 1 +#endif // set this to 1 to filter out duplicate mouse events, e.g. mouse move events // when mouse position didnd't change @@ -941,7 +944,7 @@ void wxWindowMSW::SetScrollbar(int orient, // We have to set the variables here to make them valid in events // triggered by ::SetScrollInfo() *(orient == wxHORIZONTAL ? &m_xThumbSize : &m_yThumbSize) = pageSize; - + ::SetScrollInfo(hWnd, orient == wxHORIZONTAL ? SB_HORZ : SB_VERT, &info, refresh); } @@ -1095,8 +1098,8 @@ bool wxCheckWindowWndProc(WXHWND hWnd, // TODO: This list of window class names should be factored out so they can be // managed in one place and then accessed from here and other places, such as // wxApp::RegisterWindowClasses() and wxApp::UnregisterWindowClasses() - -#ifdef __WXWINCE__ + +#ifdef __WXWINCE__ extern wxChar *wxCanvasClassName; extern wxChar *wxCanvasClassNameNR; #else @@ -1110,6 +1113,10 @@ bool wxCheckWindowWndProc(WXHWND hWnd, wxString str(wxGetWindowClass(hWnd)); if (str == wxCanvasClassName || str == wxCanvasClassNameNR || +#if wxUSE_GLCANVAS + str == _T("wxGLCanvasClass") || + str == _T("wxGLCanvasClassNR") || +#endif // wxUSE_GLCANVAS str == wxMDIFrameClassName || str == wxMDIFrameClassNameNoRedraw || str == wxMDIChildFrameClassName || @@ -1501,9 +1508,10 @@ void wxWindowMSW::DoGetSize(int *x, int *y) const // Get size *available for subwindows* i.e. excluding menu bar etc. void wxWindowMSW::DoGetClientSize(int *x, int *y) const { +#if USE_DEFERRED_SIZING if ( IsTopLevel() || m_pendingSize == wxDefaultSize ) - { - // top level windows resizing is never deferred, so we can safely use +#endif + { // top level windows resizing is never deferred, so we can safely use // the current size here RECT rect = wxGetClientRect(GetHwnd()); @@ -1512,6 +1520,7 @@ void wxWindowMSW::DoGetClientSize(int *x, int *y) const if ( y ) *y = rect.bottom; } +#if USE_DEFERRED_SIZING else // non top level and using deferred sizing { // we need to calculate the *pending* client size here @@ -1528,6 +1537,7 @@ void wxWindowMSW::DoGetClientSize(int *x, int *y) const if ( y ) *y = rect.bottom - rect.top; } +#endif } void wxWindowMSW::DoGetPosition(int *x, int *y) const @@ -4073,14 +4083,11 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc) dc.SetHDC(hdc); dc.SetWindow((wxWindow *)this); - dc.BeginDrawing(); wxEraseEvent event(m_windowId, &dc); event.SetEventObject(this); bool rc = GetEventHandler()->ProcessEvent(event); - dc.EndDrawing(); - // must be called manually as ~wxDC doesn't do anything for wxDCTemp dc.SelectOldObjects(hdc);