on xenial help sign in
drop the ignoredMice hack again
ba42b16Michael Zanetti
qml/DeviceConfiguration.qml−5
@@ -34,8 +34,6 @@ QtObject {
34
34
35 readonly property alias category: priv.category
35 readonly property alias category: priv.category
36
36
37− readonly property alias ignoredMice: priv.ignoredMice
38−
39 readonly property var priv: StateGroup {
37 readonly property var priv: StateGroup {
40 id: priv
38 id: priv
41
39
@@ -55,8 +53,6 @@ QtObject {
55 // "phone", "tablet" or "desktop"
53 // "phone", "tablet" or "desktop"
56 property string category: "phone"
54 property string category: "phone"
57
55
58− property int ignoredMice: 0
59−
60 states: [
56 states: [
61 State {
57 State {
62 name: "mako"
58 name: "mako"
@@ -83,7 +79,6 @@ QtObject {
83 supportedOrientations: Qt.PortraitOrientation
79 supportedOrientations: Qt.PortraitOrientation
84 | Qt.LandscapeOrientation
80 | Qt.LandscapeOrientation
85 | Qt.InvertedLandscapeOrientation
81 | Qt.InvertedLandscapeOrientation
86− ignoredMice: 1
87 }
82 }
88 },
83 },
89 State {
84 State {
qml/OrientedShell.qml+2−2
@@ -188,7 +188,7 @@ Rectangle {
188 nativeWidth: root.width
188 nativeWidth: root.width
189 nativeHeight: root.height
189 nativeHeight: root.height
190 mode: applicationArguments.mode
190 mode: applicationArguments.mode
191− hasMouse: miceModel.count + touchPadModel.count > deviceConfiguration.ignoredMice
191+ hasMouse: miceModel.count + touchPadModel.count > 0
192
192
193 // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
193 // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
194 // what's the output device (eg: big TV, desktop monitor, phone display), etc.
194 // what's the output device (eg: big TV, desktop monitor, phone display), etc.
@@ -202,7 +202,7 @@ Rectangle {
202 return "tablet";
202 return "tablet";
203 }
203 }
204 } else { // automatic
204 } else { // automatic
205− if (miceModel.count + touchPadModel.count > deviceConfiguration.ignoredMice) {
205+ if (miceModel.count + touchPadModel.count > 0) {
206 return "desktop";
206 return "desktop";
207 } else {
207 } else {
208 return deviceConfiguration.category;
208 return deviceConfiguration.category;