@@ -2910,5 +2910,29 @@ Rectangle {
2910 tryCompare(topLevelSurfaceList.focusedWindow, "surface", appDelegate.surface);
2910 tryCompare(topLevelSurfaceList.focusedWindow, "surface", appDelegate.surface);
2911 tryCompare(topLevelSurfaceList.applicationAt(0), "appId", "dialer-app");
2911 tryCompare(topLevelSurfaceList.applicationAt(0), "appId", "dialer-app");
2914+ function test_doubleClickPanelRestoresWindow() {
2915+ loadShell("desktop");
2916+ shell.usageScenario = "desktop";
2917+ waitForRendering(shell);
2918+ swipeAwayGreeter();
2921+ var appDelegate = startApplication("dialer-app")
2922+ verify(appDelegate);
2923+ tryCompare(appDelegate, "state", "normal");
2926+ var decoration = findChild(appDelegate, "appWindowDecoration");
2927+ verify(decoration);
2928+ mouseDoubleClickSequence(decoration);
2929+ tryCompare(appDelegate, "state", "maximized");
2931+ // double click the panel
2932+ var panel = findChild(shell, "panel");
2934+ mouseDoubleClickSequence(panel, panel.width/2, PanelState.panelHeight/2, Qt.LeftButton, Qt.NoModifier, 300);
2935+ tryCompare(appDelegate, "state", "restored");