on xenial help sign in
add inputmethod on secondary screen
db6f235Michael Zanetti
qml/DisabledScreenNotice.qml+6
@@ -66,4 +66,10 @@ Image {
66 wrapMode: Text.Wrap
66 wrapMode: Text.Wrap
67 }
67 }
68 }
68 }
69+
70+ InputMethod {
71+ id: inputMethod
72+ objectName: "inputMethod"
73+ anchors.fill: parent
74+ }
69}
75}
qml/OrientedShell.qml+15−7
@@ -18,6 +18,7 @@ import QtQuick 2.4
18import QtQuick.Window 2.2
18import QtQuick.Window 2.2
19import Unity.InputInfo 0.1
19import Unity.InputInfo 0.1
20import Unity.Session 0.1
20import Unity.Session 0.1
21+import Unity.Screens 0.1
21import GSettings 1.0
22import GSettings 1.0
22import "Components"
23import "Components"
23import "Rotation"
24import "Rotation"
@@ -78,6 +79,15 @@ Rectangle {
78 deviceFilter: InputInfo.Keyboard
79 deviceFilter: InputInfo.Keyboard
79 }
80 }
80
81
82+ InputDeviceModel {
83+ id: touchScreensModel
84+ deviceFilter: InputInfo.TouchScreen
85+ }
86+
87+ Screens {
88+ id: screens
89+ }
90+
81 property int orientation
91 property int orientation
82 onPhysicalOrientationChanged: {
92 onPhysicalOrientationChanged: {
83 if (!orientationLocked) {
93 if (!orientationLocked) {
@@ -106,13 +116,6 @@ Rectangle {
106 (shell.orientation & supportedOrientations) === 0 ? true
116 (shell.orientation & supportedOrientations) === 0 ? true
107 : shell.orientationChangesEnabled
117 : shell.orientationChangesEnabled
108
118
109−
110− Binding {
111− target: oskSettings
112− property: "stayHidden"
113− value: keyboardsModel.count > 0
114− }
115−
116 Binding {
119 Binding {
117 target: oskSettings
120 target: oskSettings
118 property: "disableHeight"
121 property: "disableHeight"
@@ -189,6 +192,11 @@ Rectangle {
189 nativeHeight: root.height
192 nativeHeight: root.height
190 mode: applicationArguments.mode
193 mode: applicationArguments.mode
191 hasMouse: miceModel.count + touchPadModel.count > deviceConfiguration.ignoredMice
194 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
192
200
193 // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
201 // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen),
194 // what's the output device (eg: big TV, desktop monitor, phone display), etc.
202 // what's the output device (eg: big TV, desktop monitor, phone display), etc.
qml/Shell.qml+1
@@ -57,6 +57,7 @@ Item {
57 property string usageScenario: "phone" // supported values: "phone", "tablet" or "desktop"
57 property string usageScenario: "phone" // supported values: "phone", "tablet" or "desktop"
58 property string mode: "full-greeter"
58 property string mode: "full-greeter"
59 property bool cursorVisible: false
59 property bool cursorVisible: false
60+ property alias oskVisible: inputMethod.visible
60 function updateFocusedAppOrientation() {
61 function updateFocusedAppOrientation() {
61 applicationsDisplayLoader.item.updateFocusedAppOrientation();
62 applicationsDisplayLoader.item.updateFocusedAppOrientation();
62 }
63 }