From 65bea426fef46ad16d70f6e0a2ea08c3cfe9c5b3 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 19 Mar 2008 13:23:41 +0000 Subject: [PATCH] have bg style wxBG_STYLE_CUSTOM not skip event git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index a568f33d28..cfc4c763ab 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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() ;