]> git.saurik.com Git - wxWidgets.git/commitdiff
Workaround for gtk-qt display bug
authorJulian Smart <julian@anthemion.co.uk>
Fri, 26 Oct 2007 10:25:04 +0000 (10:25 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 26 Oct 2007 10:25:04 +0000 (10:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 18a1c409d5aa85de255fb00a9910999e26c0e999..f7c8f27795c944853aa2d112400ec885e7286f65 100644 (file)
@@ -31,6 +31,7 @@
 #include "wx/tooltip.h"
 #include "wx/caret.h"
 #include "wx/fontutil.h"
+#include "wx/sysopt.h"
 
 #ifdef __WXDEBUG__
     #include "wx/thread.h"
@@ -3724,6 +3725,14 @@ void wxWindowGTK::GtkSendPaintEvents()
         wxWindowDC dc( (wxWindow*)this );
         dc.SetClippingRegion( m_updateRegion );
 
+        // Work around gtk-qt <= 0.60 bug whereby the window colour
+        // remains grey
+        if (GetBackgroundStyle() == wxBG_STYLE_COLOUR && GetBackgroundColour().Ok() && wxSystemOptions::GetOptionInt(wxT("gtk.window.force-background-colour")) == 1)
+        {
+            dc.SetBackground(wxBrush(GetBackgroundColour()));
+            dc.Clear();
+        }
+
         wxEraseEvent erase_event( GetId(), &dc );
         erase_event.SetEventObject( this );