Blame SOURCES/0001-padOsd-Ensure-to-pick-pad-devices-only.patch

5306fb
From 0d9c742127f4a79416478b46a9fa5273701d92e3 Mon Sep 17 00:00:00 2001
5306fb
From: Carlos Garnacho <carlosg@gnome.org>
5306fb
Date: Fri, 19 Jan 2018 10:45:50 +0100
5306fb
Subject: [PATCH] padOsd: Ensure to pick pad devices only
5306fb
5306fb
If the underlying X11 input driver creates multiple devices from a single
5306fb
device node, we may end up picking up the wrong device. So, instead of
5306fb
picking the first device based on node and bailing out if it's not a pad,
5306fb
pick the first pad that has that device node, and bail out if there is
5306fb
none.
5306fb
5306fb
https://gitlab.gnome.org/GNOME/gnome-shell/issues/10
5306fb
5306fb
Closes: #10
5306fb
---
5306fb
 js/ui/padOsd.js | 6 +++---
5306fb
 1 file changed, 3 insertions(+), 3 deletions(-)
5306fb
5306fb
diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js
5306fb
index 34ef96bb9..6e11ddfba 100644
5306fb
--- a/js/ui/padOsd.js
5306fb
+++ b/js/ui/padOsd.js
5306fb
@@ -977,12 +977,12 @@ var PadOsdService = new Lang.Class({
5306fb
         let padDevice = null;
5306fb
 
5306fb
         devices.forEach(Lang.bind(this, function(device) {
5306fb
-            if (deviceNode == device.get_device_node())
5306fb
+            if (deviceNode == device.get_device_node() &&
5306fb
+                device.get_device_type() == Clutter.InputDeviceType.PAD_DEVICE)
5306fb
                 padDevice = device;
5306fb
         }));
5306fb
 
5306fb
-        if (padDevice == null ||
5306fb
-            padDevice.get_device_type() != Clutter.InputDeviceType.PAD_DEVICE) {
5306fb
+        if (padDevice == null) {
5306fb
             invocation.return_error_literal(Gio.IOErrorEnum,
5306fb
                                             Gio.IOErrorEnum.CANCELLED,
5306fb
                                             "Invalid params");
5306fb
-- 
5306fb
2.16.1
5306fb