@@ -19,6 +19,7 @@ import QtQuick.Window 2.0
1919import Unity.Session 0.1
2020import GSettings 1.0
2121import "Components"
22+import "Components/UnityInputInfo"
2223import "Rotation"
2324
2425Rectangle {
@@ -40,32 +41,11 @@ Rectangle {
4041 name: applicationArguments.deviceName
4142 }
4243
43− UnityInputInfo {
44− id: inputInfo
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"
50− }
51− }
52−
5344 GSettings {
5445 id: oskSettings
5546 schema.id: "com.canonical.keyboard.maliit"
5647 }
5748
58− Binding {
59− target: oskSettings
60− property: "stayHidden"
61− value: inputInfo.keyboards > 0
62− }
63−
64− Binding {
65− target: oskSettings
66− property: "disableHeight"
67− value: shell.usageScenario == "desktop"
68− }
6949
7050 // to be overwritten by tests
7151 property var usageModeSettings: GSettings { schema.id: "com.canonical.Unity8" }
@@ -90,6 +70,22 @@ Rectangle {
9070 if (orientationLocked) {
9171 orientation = orientationLock.savedOrientation;
9272 }
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"
77+ }
78+
79+ Binding {
80+ target: oskSettings
81+ property: "stayHidden"
82+ value: UnityInputInfo.keyboards > 0
83+ }
84+
85+ Binding {
86+ target: oskSettings
87+ property: "disableHeight"
88+ value: shell.usageScenario == "desktop"
9389 }
9490
9591 readonly property int supportedOrientations: shell.supportedOrientations
@@ -175,7 +171,7 @@ Rectangle {
175171 return "tablet";
176172 }
177173 } else { // automatic
178− if (inputInfo.mice > 0) {
174+ if (UnityInputInfo.mice > 0) {
179175 return "desktop";
180176 } else {
181177 return deviceConfiguration.category;