@@ -37,6 +37,33 @@ Rectangle {
37 name: applicationArguments.deviceName
37 name: applicationArguments.deviceName
42+ Component.onCompleted: {
43+ // We need to manually update this on startup as the binding
44+ // below doesn't seem to have any effect at that stage
45+ oskSettings.stayHidden = keyboards > 0
46+ oskSettings.disableHeight = shell.usageScenario == "desktop"
52+ schema.id: "com.canonical.keyboard.maliit"
57+ property: "stayHidden"
58+ value: inputInfo.keyboards > 0
63+ property: "disableHeight"
64+ value: shell.usageScenario == "desktop"
40 // to be overwritten by tests
67 // to be overwritten by tests
41 property var usageModeSettings: GSettings { schema.id: "com.canonical.Unity8" }
68 property var usageModeSettings: GSettings { schema.id: "com.canonical.Unity8" }
42 property int physicalOrientation: Screen.orientation
69 property int physicalOrientation: Screen.orientation
@@ -138,11 +165,18 @@ Rectangle {
138 usageScenario: {
165 usageScenario: {
139 if (root.usageModeSettings.usageMode === "Windowed") {
166 if (root.usageModeSettings.usageMode === "Windowed") {
140 return "desktop";
167 return "desktop";
141− } else if (root.usageModeSettings.usageMode === "Staged"
168+ } else if (root.usageModeSettings.usageMode === "Staged") {
142− && deviceConfiguration.category === "desktop") {
169+ if (deviceConfiguration.category === "phone") {
143− return "tablet";
172+ return "tablet";
144− } else {
174+ } else { // automatic
175+ if (inputInfo.mice > 0) {
145− return deviceConfiguration.category;
178+ return deviceConfiguration.category;