@@ -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 {
@@ -66,12 +65,12 @@ Rectangle {
6665 } else {
6766 topLevelSurfaceList = null;
6867 appMenuData.surfaceManager = null;
69− panelState = undefined;
68+ panelState = null;
7069 }
7170 }
7271
7372 property var topLevelSurfaceList: null
74− property var panelState: undefined
73+ property var panelState: null
7574
7675 QtObject {
7776 id: _screenWindow
@@ -2666,9 +2665,9 @@ Rectangle {
26662665
26672666 function test_oskDisplacesWindow_data() {
26682667 return [
2669− {tag: "no need to displace", windowHeight: units.gu(10), windowY: units.gu(5), targetDisplacement: units.gu(5), oskEnabled: true},
2670− {tag: "displace to top", windowHeight: units.gu(50), windowY: units.gu(10), targetDisplacement: panelState.panelHeight, oskEnabled: true},
2671− {tag: "osk not on this screen", windowHeight: units.gu(40), windowY: units.gu(10), targetDisplacement: units.gu(10), oskEnabled: false},
2668+ {tag: "no need to displace", windowHeight: units.gu(10), windowY: units.gu(5), targetDisplacement: function() { return units.gu(5); }, oskEnabled: true},
2669+ {tag: "displace to top", windowHeight: units.gu(50), windowY: units.gu(10), targetDisplacement: function() { return panelState.panelHeight; }, oskEnabled: true},
2670+ {tag: "osk not on this screen", windowHeight: units.gu(40), windowY: units.gu(10), targetDisplacement: function() { return units.gu(10); }, oskEnabled: false},
26722671 ]
26732672 }
26742673
@@ -2694,7 +2693,7 @@ Rectangle {
26942693 verify(initialY > panelState.panelHeight);
26952694
26962695 topLevelSurfaceList.inputMethodSurface.setInputBounds(Qt.rect(0, root.height / 2, root.width, root.height / 2));
2697− tryCompare(dashAppDelegate, "y", data.targetDisplacement);
2696+ tryCompare(dashAppDelegate, "y", data.targetDisplacement());
26982697
26992698 topLevelSurfaceList.inputMethodSurface.setInputBounds(Qt.rect(0, 0, 0, 0));
27002699 tryCompare(dashAppDelegate, "y", initialY);
@@ -3127,7 +3126,7 @@ Rectangle {
31273126 // double click the panel
31283127 var panel = findChild(shell, "panel");
31293128 verify(panel);
3130− mouseDoubleClickSequence(panel, panel.width/2, PanelState.panelHeight/2, Qt.LeftButton, Qt.NoModifier, 300);
3129+ mouseDoubleClickSequence(panel, panel.width/2, panelState.panelHeight/2, Qt.LeftButton, Qt.NoModifier, 300);
31313130 tryCompare(appDelegate, "state", "restored");
31323131 }
31333132