]> Pileus Git - ~andy/gtk/commitdiff
widget: don't call gtk_style_context_set_background if app_paintable
authorBenjamin Otte <otte@redhat.com>
Mon, 18 Jun 2012 14:28:52 +0000 (10:28 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 18 Jun 2012 14:33:42 +0000 (10:33 -0400)
When a widget is app_paintable, its background should not be drawn by
the theme, thus we should not try to override its background again when
style-updated is fired.
This is a bit of a hack, but it fixes gray surfaces observed for DnD
windows with recent GTK+.

gtk/gtkwidget.c

index 63ad5653ef12e0f61d52b7e5825e6938dba8a1f2..1f933401df27b1df0551eecb8ed75123be8eb8e3 100644 (file)
@@ -6710,7 +6710,8 @@ gtk_widget_real_style_updated (GtkWidget *widget)
   if (widget->priv->context)
     {
       if (gtk_widget_get_realized (widget) &&
-          gtk_widget_get_has_window (widget))
+          gtk_widget_get_has_window (widget) &&
+          !gtk_widget_get_app_paintable (widget))
         gtk_style_context_set_background (widget->priv->context,
                                           widget->priv->window);
     }