@@ -1485,5 +1485,52 @@ Rectangle {
1486 keyRelease(Qt.Key_Control);
1486 keyRelease(Qt.Key_Control);
1489+ function test_selectFromSpreadWithMouse_data() {
1491+ {tag: "click on tileInfo", tileInfo: true },
1492+ {tag: "click on surface", tileInfo: false },
1496+ function test_selectFromSpreadWithMouse(data) {
1497+ loadDesktopShellWithApps()
1499+ var appRepeater = findInvisibleChild(shell, "appRepeater");
1500+ verify(appRepeater !== null);
1502+ keyPress(Qt.Key_Control)
1503+ keyClick(Qt.Key_Tab);
1505+ appRemovedSpy.clear();
1507+ var focusAppId = ApplicationManager.get(2).appId;
1508+ var appDelegate2 = appRepeater.itemAt(2);
1509+ var decoratedWindow = findChild(appDelegate2, "decoratedWindow");
1510+ var stage = findChild(shell, "stage");
1512+ tryCompare(stage, "state", "altTab");
1514+ // Move the mouse over tile 2 and verify the highlight becomes visible
1516+ var y = shell.height * (data.tileInfo ? .5 : 0.95)
1517+ mouseMove(shell, x, y)
1518+ while (appRepeater.highlightedIndex !== 2 && x <= 4000) {
1521+ mouseMove(shell, x, y)
1522+ waitForRendering(shell)
1524+ tryCompare(decoratedWindow, "highlightShown", true);
1527+ mouseClick(decoratedWindow, decoratedWindow.width / 2, decoratedWindow.height / 2)
1529+ // Verify that we left the spread and app2 is the focused one now
1530+ tryCompare(stage, "state", "");
1531+ tryCompare(ApplicationManager, "focusedApplicationId", focusAppId);
1533+ keyRelease(Qt.Key_Control);