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 689548 - Spinners inside buttons don't spin
Spinners inside buttons don't spin
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.6.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 689888
 
 
Reported: 2012-12-03 17:47 UTC by Debarshi Ray
Modified: 2014-03-17 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case (667 bytes, text/plain)
2012-12-03 17:47 UTC, Debarshi Ray
  Details
spinner: Ensure that the active flag is turned on if widget is active (1.89 KB, patch)
2012-12-03 20:59 UTC, Debarshi Ray
none Details | Review

Description Debarshi Ray 2012-12-03 17:47:11 UTC
Created attachment 230546 [details]
test case

The state changes in GtkButton caused by gtk_button_update_state are done using gtk_widget_set_state_flags with the clear set to TRUE. This overwrites the state of the spinner inside it, and sometimes causes the 'active' flag to be unset. This leads to a frozen spinner, when it should be spinning.

eg., with the attached test case, if you hover over the button the change in the button's state to prelight causes the active flag to be unset from the spinner, and so on.
Comment 1 Debarshi Ray 2012-12-03 20:59:01 UTC
Created attachment 230578 [details] [review]
spinner: Ensure that the active flag is turned on if widget is active
Comment 2 Cosimo Cecchi 2013-02-21 22:13:29 UTC
(In reply to comment #1)
> Created an attachment (id=230578) [details] [review]
> spinner: Ensure that the active flag is turned on if widget is active

This looks good to me, but it doesn't fully solve the problem I see in bug 689888.
The animation only starts when I move the pointer out of the button - i.e. when the prelight state stops being true. I tried to add an animation selector in the theme for .spinner:active:prelight, but it didn't seem to help. Calling gtk_widget_set_state_flags() with TRUE to "clear" instead made it work, but it doesn't seem correct. More investigation needed.

Benjamin, any opinions on this?
Comment 3 Matthias Clasen 2014-03-17 18:50:50 UTC
testcase seems to work fine now. please reopen if there's still a problem