@@ -32,6 +32,8 @@ Item {
32 implicitWidth: units.gu(40)
32 implicitWidth: units.gu(40)
33 implicitHeight: units.gu(71)
33 implicitHeight: units.gu(71)
35+ onWidthChanged: calculateUsageMode();
35 DeviceConfiguration {
37 DeviceConfiguration {
36 id: deviceConfiguration
38 id: deviceConfiguration
37 name: applicationArguments.deviceName
39 name: applicationArguments.deviceName
@@ -103,10 +105,15 @@ Item {
103 if (unity8Settings.usageMode === undefined)
105 if (unity8Settings.usageMode === undefined)
104 return; // gsettings isn't loaded yet, we'll try again in Component.onCompleted
106 return; // gsettings isn't loaded yet, we'll try again in Component.onCompleted
106− console.log("Pointer input devices changed:", pointerInputDevices, "current mode:", unity8Settings.usageMode, "old device count", miceModel.oldCount + touchPadModel.oldCount)
108+ console.log("Calculating new usage mode. Pointer devices:", pointerInputDevices, "current mode:", unity8Settings.usageMode, "old device count", miceModel.oldCount + touchPadModel.oldCount, "root width:", root.width / units.gu(1), "height:", root.height / units.gu(1))
107 if (unity8Settings.usageMode === "Windowed") {
109 if (unity8Settings.usageMode === "Windowed") {
110+ if (Math.min(root.width, root.height) > units.gu(60)) {
108− if (pointerInputDevices === 0) {
111+ if (pointerInputDevices === 0) {
109− // All pointer devices have been unplugged. Move to staged.
112+ // All pointer devices have been unplugged. Move to staged.
113+ unity8Settings.usageMode = "Staged";
116+ // The display is not large enough, use staged.
110 unity8Settings.usageMode = "Staged";
117 unity8Settings.usageMode = "Staged";