GNOME Bugzilla – Bug 684038
togglebutton: always set PRELIGHT state when in_button = TRUE
Last modified: 2012-09-14 17:40:10 UTC
When a toggle button is being pressed (i.e. button_down is TRUE), we end up ignoring the prelight state flags on it; this is inconsistent with GtkButton and there doesn't seem to be any good reason to do it.
Created attachment 224350 [details] [review] togglebutton: always set PRELIGHT state when in_button = TRUE Previously, we would avoid setting the prelight state flag when button_down was TRUE and draw_indicator = FALSE, which is the normal case of a GtkToggleButton during a mouse press. It looks like this behavior was introduced a long time ago with commit b94e6c0a8036a0489ac8ca71de75ba7611218e50. I believe the reason was that a widget in GTK2 couldn't have more than a single state (e.g. hover+active) at a given moment.
Attachment 224350 [details] pushed as 52ea721 - togglebutton: always set PRELIGHT state when in_button = TRUE ACK-ed by Benjamin on IRC