[gnome-shell-extensions] apps-menu: Fix up hover state after dropping grab
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] apps-menu: Fix up hover state after dropping grab
- Date: Thu, 15 Oct 2015 20:36:07 +0000 (UTC)
commit ca1da1b349dfaf2a919a1ffb85a60edd221d9a75
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Oct 4 00:51:44 2015 +0200
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
extensions/apps-menu/extension.js | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index ddd8458..3180f3a 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -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;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]