After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684038 - togglebutton: always set PRELIGHT state when in_button = TRUE
togglebutton: always set PRELIGHT state when in_button = TRUE
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-09-14 17:12 UTC by Cosimo Cecchi
Modified: 2012-09-14 17:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
togglebutton: always set PRELIGHT state when in_button = TRUE (1.20 KB, patch)
2012-09-14 17:12 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2012-09-14 17:12:42 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.
Comment 1 Cosimo Cecchi 2012-09-14 17:12:44 UTC
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.
Comment 2 Cosimo Cecchi 2012-09-14 17:40:07 UTC
Attachment 224350 [details] pushed as 52ea721 - togglebutton: always set PRELIGHT state when in_button = TRUE

ACK-ed by Benjamin on IRC