GNOME Bugzilla – Bug 316125
When a GtkButton is sensitized, it should check the cursor position
Last modified: 2006-12-26 05:05:55 UTC
Currently when an insensitive GtkButton is sensitized while the cursor hovers above it, the button doesn't change to the prelight state and can't be used without moving the cursor out of the button and back in. Here's a patch (against the gtk-2-8 branch) that attempts to rectify this. It does work in my humble testing efforts. I'm not familar with the GtkButton internals though, so I'm not sure the patch's correct.
Created attachment 52146 [details] [review] Prelighting desensitized buttons
this is a symptom of the more general problem that gtk doesn't synthesize enter/leave events upon changing the sensitivity (or global grab) state of a widget the way X does when windows are covered/uncovered by other windows. it should prolly be discussed whether a more generic solution to this problem is worth implementing for gtk. if that does not turn out to be the case, patching this behaviour up only for buttons may still make sense as this is one of the cases where it shows up most. however, the attached patch doesn't fully solve the problem, it can cause buttons to enter prelight state, eventhough a global gtk grab is currently in effect. similar related problems may appear due to missing enter/leave events, like tooltips not showing up. the complexity involved with grabs and enter/leave/crossing events when patching up state behaviour in individual widgets is part of the reason why this could make sense to be handled generically in gtk.
This should probably be marked as a duplicate of bug 56070.
*** This bug has been marked as a duplicate of 56070 ***