]> git.saurik.com Git - wxWidgets.git/commitdiff
have bg style wxBG_STYLE_CUSTOM not skip event
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 19 Mar 2008 13:23:41 +0000 (13:23 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 19 Mar 2008 13:23:41 +0000 (13:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index a568f33d287dac8da435ab0154cbb95fa945682c..cfc4c763ab7c4f4237677db2166a2598e8cdfc25 100644 (file)
@@ -2115,6 +2115,12 @@ void wxWindowMac::OnEraseBackground(wxEraseEvent& event)
     {
         event.GetDC()->Clear() ;
     }
+    else 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
+    }
     else
     {
         event.Skip() ;