X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/838ab05edec888a92d7f8979499c1e19fde19f99..79cb759dc8580da2e82e880cd94a08cd38bb814e:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index e808841ca4..0caca386a9 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2007,6 +2007,12 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags) width == currentW && height == currentH && !(sizeFlags & wxSIZE_FORCE) ) { + if (sizeFlags & wxSIZE_FORCE_EVENT) + { + wxSizeEvent event( wxSize(width,height), GetId() ); + event.SetEventObject( this ); + HandleWindowEvent( event ); + } return; } @@ -4722,14 +4728,6 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc) void wxWindowMSW::OnEraseBackground(wxEraseEvent& event) { - if ( GetBackgroundStyle() == wxBG_STYLE_CUSTOM ) - { - // don't skip the event here, custom background means that the app - // is drawing it itself in its OnPaint(), so don't draw it at all - // now to avoid flicker - return; - } - // standard non top level controls (i.e. except the dialogs) always erase // their background themselves in HandleCtlColor() or have some control- // specific ways to set the colours (common controls) @@ -4739,6 +4737,14 @@ void wxWindowMSW::OnEraseBackground(wxEraseEvent& event) return; } + if ( GetBackgroundStyle() == wxBG_STYLE_CUSTOM ) + { + // don't skip the event here, custom background means that the app + // is drawing it itself in its OnPaint(), so don't draw it at all + // now to avoid flicker + return; + } + wxDC *dc = event.GetDC(); if (!dc) return; wxMSWDCImpl *impl = (wxMSWDCImpl*) dc->GetImpl();