@@ -47,6 +47,7 @@ FocusScope {
4747 property bool suspended
4848 property int leftMargin: 0
4949 property bool oskEnabled: false
50+ property rect inputMethodRect
5051
5152 // Configuration
5253 property string mode: "staged"
@@ -306,9 +307,7 @@ FocusScope {
306307 return -1;
307308 }
308309
309− readonly property real virtualKeyboardHeight: SurfaceManager.inputMethodSurface
310− ? SurfaceManager.inputMethodSurface.inputBounds.height
311− : 0
310+ readonly property real virtualKeyboardHeight: root.inputMethodRect.height
312311 }
313312
314313 Component.onCompleted: priv.updateMainAndSideStageIndexes();
@@ -641,9 +640,7 @@ FocusScope {
641640 Math.min(appDelegate.requestedY - PanelState.panelHeight,
642641 Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
643642 when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")
644− && SurfaceManager.inputMethodSurface
645− && SurfaceManager.inputMethodSurface.state != Mir.HiddenState
646− && SurfaceManager.inputMethodSurface.state != Mir.MinimizedState
643+ && root.inputMethodRect.height > 0
647644
648645 }
649646
@@ -1837,7 +1834,6 @@ FocusScope {
18371834
18381835 consumesInput: false
18391836 interactive: false
1840−// resizeSurface: false
18411837 focus: false
18421838 requestedWidth: appDelegate.requestedWidth
18431839 requestedHeight: appDelegate.requestedHeight