GNOME Bugzilla – Bug 301651
gtk+ buttons should not base prelight drawing on their GTK_WIDGET_STATE
Last modified: 2014-01-25 02:35:31 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:
Created attachment 45569 [details] [review] patch
Why is it preferrable to do things this way ? I think a little comment next to the state_type manipulations would be good
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;
Is this the same as bug #304548 ?
Needs global motion events
Was the last comment and the dependency put on the wrong bug?
Probably. Buttons select for enter/leave anyway, so they don't need global events, right ?
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).
this works as expected now, and we do have prelighting of notebook tabs