on xenial help sign in
use inputMethodVisibleRect as suggested in review
5ca7d98Michael Zanetti
qml/Shell.qml+1
@@ -283,6 +283,7 @@ StyledItem {
283
283
284 applicationManager: ApplicationManager
284 applicationManager: ApplicationManager
285 topLevelSurfaceList: topLevelSurfaceList
285 topLevelSurfaceList: topLevelSurfaceList
286+ inputMethodRect: inputMethod.visibleRect
286
287
287 property string usageScenario: shell.usageScenario === "phone" || greeter.hasLockedApp
288 property string usageScenario: shell.usageScenario === "phone" || greeter.hasLockedApp
288 ? "phone"
289 ? "phone"
qml/Stage/ApplicationWindow.qml−1
@@ -33,7 +33,6 @@ FocusScope {
33 property QtObject surface
33 property QtObject surface
34 property QtObject application
34 property QtObject application
35 property int surfaceOrientationAngle
35 property int surfaceOrientationAngle
36− property alias resizeSurface: surfaceContainer.resizeSurface
37 property int requestedWidth: -1
36 property int requestedWidth: -1
38 property int requestedHeight: -1
37 property int requestedHeight: -1
39 property real splashRotation: 0
38 property real splashRotation: 0
qml/Stage/Stage.qml+3−7
@@ -47,6 +47,7 @@ FocusScope {
47 property bool suspended
47 property bool suspended
48 property int leftMargin: 0
48 property int leftMargin: 0
49 property bool oskEnabled: false
49 property bool oskEnabled: false
50+ property rect inputMethodRect
50
51
51 // Configuration
52 // Configuration
52 property string mode: "staged"
53 property string mode: "staged"
@@ -306,9 +307,7 @@ FocusScope {
306 return -1;
307 return -1;
307 }
308 }
308
309
309− readonly property real virtualKeyboardHeight: SurfaceManager.inputMethodSurface
310+ readonly property real virtualKeyboardHeight: root.inputMethodRect.height
310− ? SurfaceManager.inputMethodSurface.inputBounds.height
311− : 0
312 }
311 }
313
312
314 Component.onCompleted: priv.updateMainAndSideStageIndexes();
313 Component.onCompleted: priv.updateMainAndSideStageIndexes();
@@ -641,9 +640,7 @@ FocusScope {
641 Math.min(appDelegate.requestedY - PanelState.panelHeight,
640 Math.min(appDelegate.requestedY - PanelState.panelHeight,
642 Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
641 Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
643 when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")
642 when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")
644− && SurfaceManager.inputMethodSurface
643+ && root.inputMethodRect.height > 0
645− && SurfaceManager.inputMethodSurface.state != Mir.HiddenState
646− && SurfaceManager.inputMethodSurface.state != Mir.MinimizedState
647
644
648 }
645 }
649
646
@@ -1837,7 +1834,6 @@ FocusScope {
1837
1834
1838 consumesInput: false
1835 consumesInput: false
1839 interactive: false
1836 interactive: false
1840−// resizeSurface: false
1841 focus: false
1837 focus: false
1842 requestedWidth: appDelegate.requestedWidth
1838 requestedWidth: appDelegate.requestedWidth
1843 requestedHeight: appDelegate.requestedHeight
1839 requestedHeight: appDelegate.requestedHeight