GNOME Bugzilla – Bug 692554
entry: never use GTK_STATE_ACTIVE to paint the background
Last modified: 2013-01-25 20:17:34 UTC
This is a patch against gtk-2-24 that makes it possible to fix https://bugzilla.gnome.org/show_bug.cgi?id=685712 Rationale in the commit message
Created attachment 234443 [details] [review] entry: never use GTK_STATE_ACTIVE to paint the background When state-hint is TRUE, GTK_STATE_ACTIVE was used to paint the entry background and frame, since commit 207f3f8685f21bbade8ae0a6551a0e92d6baad89. Given that everywhere else in GTK2 - including GtkEntry itself in draw_text_with_color() - GTK_STATE_ACTIVE is used for non-toggleable widgets to indicate selected but not focused text, this leads to the entry painting itself with the wrong background color when focused. This is unsolvable from the theme, as changing the ACTIVE background color to be the same as NORMAL would give a wrong background to selected but not focused text as per above. This patch avoids using GTK_STATE_ACTIVE to paint GtkEntry's background, changing the code so that the widget state is always used instead.
Attachment 234443 [details] pushed as 87115e0 - entry: never use GTK_STATE_ACTIVE to paint the background