on xenial help sign in
Fixed mutiple screen input method resize
commit63179f0e2480ea4e53c5bacf47ff2978aa0b7a66 authorNick Dedekind <nick.dedekind@canonical.com> dateThu 5 May 2016, 10:09 (10 years ago) parent3baed3c
3 files changed+10−2
qml/Components/InputMethod.qml+3−2 qml/DisabledScreenNotice.qml+6 qml/Shell.qml+1
qml/Components/InputMethod.qml+3−2
@@ -22,6 +22,7 @@ import Ubuntu.Gestures 0.1
2222Item {
2323 id: root
2424
25+ property bool active: false
2526 property int transitionDuration: UbuntuAnimation.FastDuration
2627
2728 MirSurfaceItem {
@@ -30,8 +31,8 @@ Item {
3031
3132 consumesInput: true
3233
33− surfaceWidth: width
34− surfaceHeight: height
34+ surfaceWidth: root.active ? width : -1
35+ surfaceHeight: root.active ? height : -1
3536 surface: SurfaceManager.inputMethodSurface
3637
3738 onLiveChanged: {
qml/DisabledScreenNotice.qml+6
@@ -18,6 +18,7 @@ import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import Ubuntu.Components 1.3
2020import Unity.Session 0.1
21+import Unity.Screens 0.1
2122import QtQuick.Window 2.2
2223import "Components"
2324
@@ -35,6 +36,10 @@ Item {
3536 name: applicationArguments.deviceName
3637 }
3738
39+ Screens {
40+ id: screens
41+ }
42+
3843 Item {
3944 id: contentContainer
4045 objectName: "contentContainer"
@@ -119,6 +124,7 @@ Item {
119124
120125 InputMethod {
121126 id: inputMethod
127+ active: screens.count > 1
122128 objectName: "inputMethod"
123129 anchors.fill: parent
124130 }
qml/Shell.qml+1
@@ -392,6 +392,7 @@ Item {
392392 InputMethod {
393393 id: inputMethod
394394 objectName: "inputMethod"
395+ active: oskEnabled
395396 anchors {
396397 fill: parent
397398 topMargin: panel.panelHeight