@@ -19,6 +19,7 @@ import QtQuick.Window 2.0
19import Unity.Session 0.1
19import Unity.Session 0.1
20import GSettings 1.0
20import GSettings 1.0
21import "Components"
21import "Components"
22+import "Components/UnityInputInfo"
22import "Rotation"
23import "Rotation"
24Rectangle {
25Rectangle {
@@ -40,32 +41,11 @@ Rectangle {
40 name: applicationArguments.deviceName
41 name: applicationArguments.deviceName
45− Component.onCompleted: {
46− // We need to manually update this on startup as the binding
47− // below doesn't seem to have any effect at that stage
48− oskSettings.stayHidden = keyboards > 0
49− oskSettings.disableHeight = shell.usageScenario == "desktop"
53 GSettings {
44 GSettings {
54 id: oskSettings
45 id: oskSettings
55 schema.id: "com.canonical.keyboard.maliit"
46 schema.id: "com.canonical.keyboard.maliit"
60− property: "stayHidden"
61− value: inputInfo.keyboards > 0
66− property: "disableHeight"
67− value: shell.usageScenario == "desktop"
70 // to be overwritten by tests
50 // to be overwritten by tests
71 property var usageModeSettings: GSettings { schema.id: "com.canonical.Unity8" }
51 property var usageModeSettings: GSettings { schema.id: "com.canonical.Unity8" }
@@ -90,6 +70,22 @@ Rectangle {
90 if (orientationLocked) {
70 if (orientationLocked) {
91 orientation = orientationLock.savedOrientation;
71 orientation = orientationLock.savedOrientation;
73+ // We need to manually update this on startup as the binding
74+ // below doesn't seem to have any effect at that stage
75+ oskSettings.stayHidden = UnityInputInfo.keyboards > 0
76+ oskSettings.disableHeight = shell.usageScenario == "desktop"
81+ property: "stayHidden"
82+ value: UnityInputInfo.keyboards > 0
87+ property: "disableHeight"
88+ value: shell.usageScenario == "desktop"
95 readonly property int supportedOrientations: shell.supportedOrientations
91 readonly property int supportedOrientations: shell.supportedOrientations
@@ -175,7 +171,7 @@ Rectangle {
175 return "tablet";
171 return "tablet";
177 } else { // automatic
173 } else { // automatic
178− if (inputInfo.mice > 0) {
174+ if (UnityInputInfo.mice > 0) {
179 return "desktop";
175 return "desktop";
181 return deviceConfiguration.category;
177 return deviceConfiguration.category;