1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From 4411d9db6ee6112f987fac8469a2cc617f4f9b6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Fri, 20 Sep 2019 21:08:45 +0200
Subject: [PATCH] shellDBus: Don't assume devices have a node
Clutter.InputDevice.get_device_node() may return null. Handle that
case when building the 'AcceleratorActivated' vardict parameter.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1641
---
js/ui/shellDBus.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index e750c207f9..fca0b64255 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -151,9 +151,13 @@ var GnomeShell = class {
let connection = this._dbusImpl.get_connection();
let info = this._dbusImpl.get_info();
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) };
+
+ let deviceNode = device.get_device_node();
+ if (deviceNode)
+ params['device-node'] = GLib.Variant.new('s', deviceNode);
+
connection.emit_signal(destination,
this._dbusImpl.get_object_path(),
info ? info.name : null,
--
2.22.0
|