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:
Florian Müllner
2015-10-04 00:51:44 +02:00
parent 7c5f0ed87f
commit ca1da1b349
+5
View File
@@ -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;
},