[gnome-shell/wip/carlosg/accelerators-with-device] shellDBus: Update ::accelerator-activated handler arguments



commit 2866a7daf363ff89b48b4d182f96e27870de2210
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jul 8 11:44:12 2019 +0200

    shellDBus: Update ::accelerator-activated handler arguments
    
    Mutter now passes a ClutterInputDevice. And use this to pass the
    device ID (as we used to do) and the event node (so we can transition
    to something that works on x11/wayland)

 js/ui/shellDBus.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index a9224f841..1f328c9fe 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -27,8 +27,8 @@ var GnomeShell = class {
         this._grabbers = new Map();
 
         global.display.connect('accelerator-activated',
-            (display, action, deviceid, timestamp) => {
-                this._emitAcceleratorActivated(action, deviceid, timestamp);
+            (display, action, device, timestamp) => {
+                this._emitAcceleratorActivated(action, device, timestamp);
             });
 
         this._cachedOverviewVisible = false;
@@ -144,14 +144,15 @@ var GnomeShell = class {
         return invocation.return_value(GLib.Variant.new('(b)', [ungrabSucceeded]));
     }
 
-    _emitAcceleratorActivated(action, deviceid, timestamp) {
+    _emitAcceleratorActivated(action, device, timestamp) {
         let destination = this._grabbedAccelerators.get(action);
         if (!destination)
             return;
 
         let connection = this._dbusImpl.get_connection();
         let info = this._dbusImpl.get_info();
-        let params = { 'device-id': GLib.Variant.new('u', deviceid),
+        let params = { 'device-id': GLib.Variant.new('u', device.get_device_id()),
+                       'device-node': GLib.Variant.new('s', device.get_device_node()),
                        'timestamp': GLib.Variant.new('u', timestamp),
                        'action-mode': GLib.Variant.new('u', Main.actionMode) };
         connection.emit_signal(destination,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]