summaryrefslogtreecommitdiff
path: root/gladeui/glade-dnd.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-11-18 11:41:16 -0500
committerMatthias Clasen <mclasen@redhat.com>2015-11-25 22:19:33 -0500
commit23d5293d22a69f366699b78b6fafba7ec9b9af73 (patch)
treebe142a806f00b87204da487817868d97ef2f6855 /gladeui/glade-dnd.c
parentb2c94a56a4ad57c5d77280718164503b8c5d2538 (diff)
downloadglade-23d5293d22a69f366699b78b6fafba7ec9b9af73.tar.gz
dnd: Avoid GTK+ warnings
GTK+ warns nowadays if the state passed to gtk_style_context_get_* does not match the state of the context. Avoid this by using the state of the context. https://bugzilla.gnome.org/show_bug.cgi?id=758297
Diffstat (limited to 'gladeui/glade-dnd.c')
-rw-r--r--gladeui/glade-dnd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gladeui/glade-dnd.c b/gladeui/glade-dnd.c
index a726344b..1a2991cf 100644
--- a/gladeui/glade-dnd.c
+++ b/gladeui/glade-dnd.c
@@ -97,7 +97,7 @@ on_drag_icon_draw (GtkWidget *widget, cairo_t *cr)
h = alloc.height;
h2 = h/2.0;
- gtk_style_context_get_background_color (context, GTK_STATE_NORMAL, &bg);
+ gtk_style_context_get_background_color (context, gtk_style_context_get_state (context), &bg);
gradient = cairo_pattern_create_linear (x, y, x, y+h);
cairo_pattern_add_color_stop_rgba (gradient, 0, bg.red, bg.green, bg.blue, 0);