]> git.saurik.com Git - wxWidgets.git/commitdiff
Handle deprecated background styles correctly in wxMSW.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 24 Sep 2009 00:22:04 +0000 (00:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 24 Sep 2009 00:22:04 +0000 (00:22 +0000)
Handle wxBG_STYLE_TRANSPARENT as wxBG_STYLE_PAINT and wxBG_STYLE_COLOUR as
wxBG_STYLE_ERASE instead of asserting (and almost surely crashing next, as
this assert is in the code called when the window is repainted and so will be
called again when the assert dialog is shown resulting in reentrant assert).

Closes #11208.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index b518542e20d10142c1d429930a71df0a31aa076b..4316f77e8b93f28a2c7c64834fe884807684a8ea 100644 (file)
@@ -4760,6 +4760,7 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
     switch ( GetBackgroundStyle() )
     {
         case wxBG_STYLE_ERASE:
+        case wxBG_STYLE_COLOUR:
             // we need to generate an erase background event
             {
                 wxDCTemp dc(hdc, GetClientSize());
@@ -4794,6 +4795,7 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
             break;
 
         case wxBG_STYLE_PAINT:
+        case wxBG_STYLE_TRANSPARENT:
             // no need to do anything here at all, background will be entirely
             // redrawn in WM_PAINT handler
             break;