[gtk+] widget: don't call gtk_style_context_set_background if app_paintable
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget: don't call gtk_style_context_set_background if app_paintable
- Date: Mon, 18 Jun 2012 14:33:58 +0000 (UTC)
commit 9b47bc5c95cd2aa18abcb476febe2fc39fbc30c3
Author: Benjamin Otte <otte redhat com>
Date: Mon Jun 18 10:28:52 2012 -0400
widget: don't call gtk_style_context_set_background if app_paintable
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 | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 63ad565..1f93340 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]