summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-09 20:40:21 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-13 15:05:43 +0100
commitd1c10a0a832731f81db1c627c07fe5d750543294 (patch)
treecd2644dfc7128582bc57ce4c9e6ec7b594eedf37 /eel
parent7a2f6641563b525bf32c18a2e52ac290f06c9a53 (diff)
downloadcaja-d1c10a0a832731f81db1c627c07fe5d750543294.tar.bz2
caja-d1c10a0a832731f81db1c627c07fe5d750543294.tar.xz
GTK3 editable-label: fix selection color in backdrop state
Don't set the ACTIVE flag if we don't have focus, it just doesn't make sense. taken from: https://git.gnome.org/browse/nautilus/commit/?id=845d3fc
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-editable-label.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 834f2d1a..4e1cbdf5 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -1733,9 +1733,8 @@ eel_editable_label_draw (GtkWidget *widget,
gdk_cairo_region (cr, clip);
cairo_clip (cr);
- state = GTK_STATE_FLAG_SELECTED;
- if (!gtk_widget_has_focus (widget))
- state = GTK_STATE_FLAG_ACTIVE;
+ state = gtk_widget_get_state_flags (widget);
+ state |= GTK_STATE_FLAG_SELECTED;
gtk_style_context_get_background_color (style, state, &background_color);
gdk_cairo_set_source_rgba (cr, &background_color);