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 301651 - gtk+ buttons should not base prelight drawing on their GTK_WIDGET_STATE
gtk+ buttons should not base prelight drawing on their GTK_WIDGET_STATE
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: Small feature
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-04-22 23:31 UTC by Soren Sandmann Pedersen
Modified: 2014-01-25 02:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.53 KB, patch)
2005-04-22 23:32 UTC, Soren Sandmann Pedersen
none Details | Review

Description Soren Sandmann Pedersen 2005-04-22 23:31:27 UTC
Please describe the problem:
Here is a patch to make them base their drawing of prelight on the position of
the mouse instead

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Soren Sandmann Pedersen 2005-04-22 23:32:09 UTC
Created attachment 45569 [details] [review]
patch
Comment 2 Matthias Clasen 2005-04-29 13:35:41 UTC
Why is it preferrable to do things this way ? 
I think a little comment next to the state_type manipulations would be good
Comment 3 Soren Sandmann Pedersen 2005-04-29 13:43:58 UTC
It's preferable because if the button is inside something that can be prelighted
by itself (which notebook tabs hopefully will be able to at some point), then
you don't want the button to become raised when only the enclosing widget is
prelighted. 

I think there is a bug in the patch though; active toggle buttons should also
prelight when the mouse is inside them, ie., 

+      if (button->in_button && !button->depressed)
+	state_type = GTK_STATE_PRELIGHT;

should be something like


+      if (button->in_button && (!button->depressed || 
+                                 (toggle_button->active &&
+                                  !button->button_down))
+	state_type = GTK_STATE_PRELIGHT;
Comment 4 Federico Mena Quintero 2005-06-15 01:33:01 UTC
Is this the same as bug #304548 ?
Comment 5 Matthias Clasen 2005-06-21 04:14:39 UTC
Needs global motion events
Comment 6 Owen Taylor 2005-06-21 11:12:44 UTC
Was the last comment and the dependency put on the wrong bug?
Comment 7 Matthias Clasen 2005-06-21 13:13:42 UTC
Probably. 
Buttons select for enter/leave anyway, so they don't need global events, right ?
Comment 8 Owen Taylor 2005-06-21 14:15:03 UTC
The event window which is meant to be over the contents eliminates
the need for global events for GtkButton (and I don't see what it would
have to do with the subject of this bug anyways).
Comment 9 Matthias Clasen 2014-01-25 02:35:31 UTC
this works as expected now, and we do have prelighting of notebook tabs