@@ -18,6 +18,7 @@ import QtQuick 2.4
1818import QtQuick.Window 2.2
1919import Unity.InputInfo 0.1
2020import Unity.Session 0.1
21+import Unity.Screens 0.1
2122import GSettings 1.0
2223import "Components"
2324import "Rotation"
@@ -78,6 +79,15 @@ Rectangle {
7879 deviceFilter: InputInfo.Keyboard
7980 }
8081
82+ InputDeviceModel {
83+ id: touchScreensModel
84+ deviceFilter: InputInfo.TouchScreen
85+ }
86+
87+ Screens {
88+ id: screens
89+ }
90+
8191 property int orientation
8292 onPhysicalOrientationChanged: {
8393 if (!orientationLocked) {
@@ -106,13 +116,6 @@ Rectangle {
106116 (shell.orientation & supportedOrientations) === 0 ? true
107117 : shell.orientationChangesEnabled
108118
109−
110− Binding {
111− target: oskSettings
112− property: "stayHidden"
113− value: keyboardsModel.count > 0
114− }
115−
116119 Binding {
117120 target: oskSettings
118121 property: "disableHeight"
@@ -189,6 +192,11 @@ Rectangle {
189192 nativeHeight: root.height
190193 mode: applicationArguments.mode
191194 hasMouse: miceModel.count + touchPadModel.count > deviceConfiguration.ignoredMice
195+ // TODO: Factor in if the current screen is a touch screen and if the user wants to
196+ // have multiple keyboards around. For now we only enable one keyboard at a time
197+ // thus hiding it here if there is a physical one around or if we have a second
198+ // screen (the virtual touchpad & osk on the phone) attached.
199+ oskVisible: keyboardsModel.count === 0 && screens.count === 1
192200
193201 // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
194202 // what's the output device (eg: big TV, desktop monitor, phone display), etc.