From 53be76c9e206d21942c7d03abcf688d9295a8f22 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 8 Jul 2019 11:44:12 +0200 Subject: [PATCH] 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) https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/618 --- 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,