Ubuntu Pastebin

Paste from micha at Fri, 20 Nov 2015 18:00:43 +0000

Download as text
 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
micha@Shadow ~/Develop/unity8  $  bzr diff
=== modified file 'qml/OrientedShell.qml'
--- qml/OrientedShell.qml       2015-11-06 10:00:29 +0000
+++ qml/OrientedShell.qml       2015-11-20 18:00:30 +0000
@@ -69,6 +69,11 @@
     }
 
     InputDeviceModel {
+        id: touchPadModel
+        deviceFilter: InputInfo.TouchPad
+    }
+
+    InputDeviceModel {
         id: keyboardsModel
         deviceFilter: InputInfo.Keyboard
     }
@@ -183,7 +188,7 @@
         nativeWidth: root.width
         nativeHeight: root.height
         mode: applicationArguments.mode
-        hasMouse: miceModel.count > deviceConfiguration.ignoredMice
+        hasMouse: miceModel.count + touchPadModel.count > deviceConfiguration.ignoredMice
 
         // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
         //       what's the output device (eg: big TV, desktop monitor, phone display), etc.
@@ -197,7 +202,7 @@
                     return "tablet";
                 }
             } else { // automatic
-                if (miceModel.count > deviceConfiguration.ignoredMice) {
+                if (miceModel.count + touchPadModel.count > deviceConfiguration.ignoredMice) {
                     return "desktop";
                 } else {
                     return deviceConfiguration.category;
Download as text