@@ -222,7 +222,7 @@ Rectangle {
222 CheckBox {
222 CheckBox {
223 activeFocusOnPress: false
223 activeFocusOnPress: false
224 onCheckedChanged: {
224 onCheckedChanged: {
225− var surface = SurfaceManager.inputMethodSurface;
225+ var surface = topLevelSurfaceList.inputMethodSurface;
226 if (checked) {
226 if (checked) {
227 surface.setState(Mir.RestoredState);
227 surface.setState(Mir.RestoredState);
@@ -255,6 +255,15 @@ Rectangle {
255 property real halfWidth: shell ? shell.width / 2 : 0
255 property real halfWidth: shell ? shell.width / 2 : 0
256 property real halfHeight: shell ? shell.height / 2 : 0
256 property real halfHeight: shell ? shell.height / 2 : 0
260+ topLevelSurfaceList = testCase.findInvisibleChild(shell, "topLevelSurfaceList");
262+ topLevelSurfaceList = null;
265+ property var topLevelSurfaceList: null
258 function init() {
267 function init() {
259 prepareShell();
268 prepareShell();
@@ -299,7 +308,7 @@ Rectangle {
299 tryCompare(shell, "waitingOnGreeter", false); // reset by greeter when ready
308 tryCompare(shell, "waitingOnGreeter", false); // reset by greeter when ready
301 WindowStateStorage.clear();
310 WindowStateStorage.clear();
302− SurfaceManager.inputMethodSurface.setState(Mir.MinimizedState);
311+ //topLevelSurfaceList.inputMethodSurface.setState(Mir.MinimizedState);
303 callManager.foregroundCall = null;
312 callManager.foregroundCall = null;
304 AccountsService.demoEdges = false;
313 AccountsService.demoEdges = false;
305 AccountsService.demoEdgesCompleted = [];
314 AccountsService.demoEdgesCompleted = [];
@@ -313,6 +322,14 @@ Rectangle {
313 prepareShell();
322 prepareShell();
325+ function ensureInputMethodSurface() {
326+ var surfaceManager = findInvisibleChild(shell, "surfaceManager");
327+ verify(surfaceManager);
328+ surfaceManager.createInputMethodSurface();
330+ tryCompareFunction(function() { return root.topLevelSurfaceList.inputMethodSurface !== null }, true);
316 function swipeAwayGreeter() {
333 function swipeAwayGreeter() {
317 var coverPage = findChild(shell, "coverPage");
334 var coverPage = findChild(shell, "coverPage");
318 tryCompare(coverPage, "showProgress", 1);
335 tryCompare(coverPage, "showProgress", 1);
@@ -711,7 +728,8 @@ Rectangle {
711 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
728 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
712 verify(tutorialLeftLoader.shown);
729 verify(tutorialLeftLoader.shown);
731+ ensureInputMethodSurface();
714− var surface = SurfaceManager.inputMethodSurface;
732+ var surface = topLevelSurfaceList.inputMethodSurface;
715 surface.setState(Mir.RestoredState);
733 surface.setState(Mir.RestoredState);
717 var inputMethod = findInvisibleChild(shell, "inputMethod");
735 var inputMethod = findInvisibleChild(shell, "inputMethod");
@@ -724,7 +742,8 @@ Rectangle {
724 var tutorial = findChild(shell, "tutorial");
742 var tutorial = findChild(shell, "tutorial");
725 verify(!tutorial.delayed);
743 verify(!tutorial.delayed);
745+ ensureInputMethodSurface();
727− SurfaceManager.inputMethodSurface.setState(Mir.RestoredState);
746+ topLevelSurfaceList.inputMethodSurface.setState(Mir.RestoredState);
729 tryCompare(tutorial, "delayed", true);
748 tryCompare(tutorial, "delayed", true);