[gnome-shell-extensions] apps-menu: Adjust to mutter API change
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] apps-menu: Adjust to mutter API change
- Date: Wed, 21 Aug 2019 17:45:27 +0000 (UTC)
commit fcbfaec53ec82b095b928599ff8d11859474c956
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Aug 21 19:30:56 2019 +0200
apps-menu: Adjust to mutter API change
The global grab API got dropped from mutter's Clutter fork, so use the
corresponding input device API instead.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/90
extensions/apps-menu/extension.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index 7144f5d..70383af 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -181,10 +181,11 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
}
_onMotionEvent(actor, event) {
- if (!Clutter.get_pointer_grab()) {
+ let device = event.get_device();
+ if (!device.get_grabbed_actor()) {
this._oldX = -1;
this._oldY = -1;
- Clutter.grab_pointer(this);
+ device.grab(this);
}
this.hover = true;
@@ -194,7 +195,7 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
this._oldX = -1;
this._oldY = -1;
this.hover = false;
- Clutter.ungrab_pointer();
+ device.ungrab();
let source = event.get_source();
if (source instanceof St.Widget)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]