From c9182d1f188d800dacc64265e8576e9e3e871319 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 26 Oct 2007 10:24:34 +0000 Subject: [PATCH] Workaround for gtk-qt theme bug git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index dfd7395b7e..6877b795e7 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -36,6 +36,7 @@ #include "wx/tooltip.h" #include "wx/caret.h" #include "wx/fontutil.h" +#include "wx/sysopt.h" #ifdef __WXDEBUG__ #include "wx/thread.h" @@ -3736,8 +3737,17 @@ void wxWindowGTK::GtkSendPaintEvents() else { 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 );