@@ -38,7 +38,6 @@ import Unity.Indicators 0.1 as Indicators
3838
3939import "../../qml"
4040import "../../qml/Components"
41−import "../../qml/Components/PanelState"
4241import "Stage"
4342
4443Rectangle {
@@ -57,19 +56,16 @@ Rectangle {
5756 id: appMenuData
5857 }
5958
60− property var shell: shellLoader.item ? shellLoader.item : null
59+ readonly property var shell: shellLoader.item ? shellLoader.item : null
6160 onShellChanged: {
6261 if (shell) {
63− topLevelSurfaceList = shell.topLevelSurfaceList;
6462 panelState = testCase.findInvisibleChild(shell, "panelState");
6563 } else {
66− topLevelSurfaceList = null;
67− panelState = undefined;
64+ panelState = null;
6865 }
6966 }
70−
71− property var topLevelSurfaceList: null
72− property var panelState: undefined
67+ property var panelState: null
68+ readonly property alias topLevelSurfaceList: testCase.topLevelSurfaceList
7369
7470 QtObject {
7571 id: _screenWindow
@@ -569,6 +565,7 @@ Rectangle {
569565 when: windowShown
570566
571567 property Item shell: shellLoader.status === Loader.Ready ? shellLoader.item : null
568+ topLevelSurfaceList: shell ? shell.topLevelSurfaceList : null
572569
573570 function init() {
574571 if (shellLoader.active) {
@@ -607,7 +604,6 @@ Rectangle {
607604 waitForGreeterToStabilize();
608605
609606 // from StageTestCase
610− topLevelSurfaceList = shell.topLevelSurfaceList;
611607 verify(topLevelSurfaceList);
612608 stage = findChild(shell, "stage");
613609
@@ -2659,9 +2655,9 @@ Rectangle {
26592655
26602656 function test_oskDisplacesWindow_data() {
26612657 return [
2662− {tag: "no need to displace", windowHeight: units.gu(10), windowY: units.gu(5), targetDisplacement: units.gu(5), oskEnabled: true},
2663− {tag: "displace to top", windowHeight: units.gu(50), windowY: units.gu(10), targetDisplacement: panelState.panelHeight, oskEnabled: true},
2664− {tag: "osk not on this screen", windowHeight: units.gu(40), windowY: units.gu(10), targetDisplacement: units.gu(10), oskEnabled: false},
2658+ {tag: "no need to displace", windowHeight: units.gu(10), windowY: units.gu(5), targetDisplacement: function() { return units.gu(5); }, oskEnabled: true},
2659+ {tag: "displace to top", windowHeight: units.gu(50), windowY: units.gu(10), targetDisplacement: function() { return panelState.panelHeight; }, oskEnabled: true},
2660+ {tag: "osk not on this screen", windowHeight: units.gu(40), windowY: units.gu(10), targetDisplacement: function() { return units.gu(10); }, oskEnabled: false},
26652661 ]
26662662 }
26672663
@@ -2687,7 +2683,7 @@ Rectangle {
26872683 verify(initialY > panelState.panelHeight);
26882684
26892685 topLevelSurfaceList.inputMethodSurface.setInputBounds(Qt.rect(0, root.height / 2, root.width, root.height / 2));
2690− tryCompare(dashAppDelegate, "y", data.targetDisplacement);
2686+ tryCompare(dashAppDelegate, "y", data.targetDisplacement());
26912687
26922688 topLevelSurfaceList.inputMethodSurface.setInputBounds(Qt.rect(0, 0, 0, 0));
26932689 tryCompare(dashAppDelegate, "y", initialY);
@@ -3120,7 +3116,7 @@ Rectangle {
31203116 // double click the panel
31213117 var panel = findChild(shell, "panel");
31223118 verify(panel);
3123− mouseDoubleClickSequence(panel, panel.width/2, PanelState.panelHeight/2, Qt.LeftButton, Qt.NoModifier, 300);
3119+ mouseDoubleClickSequence(panel, panel.width/2, panelState.panelHeight/2, Qt.LeftButton, Qt.NoModifier, 300);
31243120 tryCompare(appDelegate, "state", "restored");
31253121 }
31263122