apps-menu: Fix up hover state after dropping grab
Category items grab the pointer to implement "triangle navigation", which interferes with automatic hover tracking in other widgets. While this is the correct behavior while we hold the grab (i.e. when crossing other category items without switching), it can interfere with user expectation when the grab is dropped, as the motion event that causes us to do so doesn't necessarily occur before the "target"'s enter event - address this by syncing up the hover state manually after dropping the grab. https://bugzilla.gnome.org/show_bug.cgi?id=754959
This commit is contained in:
@@ -190,6 +190,11 @@ const CategoryMenuItem = new Lang.Class({
|
||||
this._oldY = -1;
|
||||
this.actor.hover = false;
|
||||
Clutter.ungrab_pointer();
|
||||
|
||||
let source = event.get_source();
|
||||
if (source instanceof St.Widget)
|
||||
source.sync_hover();
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user