@@ -1574,18 +1574,21 @@ Rectangle {
1574 function test_selectFromSpreadWithMouse(data) {
1574 function test_selectFromSpreadWithMouse(data) {
1575 loadDesktopShellWithApps()
1575 loadDesktopShellWithApps()
1577+ var stage = findChild(shell, "stage");
1578+ var spread = findChild(stage, "spread");
1579+ waitForRendering(spread)
1577− var appRepeater = findInvisibleChild(shell, "appRepeater");
1581+ var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1578− verify(appRepeater !== null);
1582+ verify(spreadRepeater !== null);
1580 keyPress(Qt.Key_Control)
1584 keyPress(Qt.Key_Control)
1581 keyClick(Qt.Key_Tab);
1585 keyClick(Qt.Key_Tab);
1583 var focusAppId = ApplicationManager.get(2).appId;
1587 var focusAppId = ApplicationManager.get(2).appId;
1584− var appDelegate2 = appRepeater.itemAt(2);
1588+ var spreadDelegate2 = spreadRepeater.itemAt(2);
1585− var decoratedWindow = findChild(appDelegate2, "decoratedWindow");
1589+ var clippedSpreadDelegate = findChild(spreadDelegate2, "clippedSpreadDelegate");
1586− var stage = findChild(shell, "stage");
1588− tryCompare(stage, "state", "altTab");
1591+ tryCompare(spread, "state", "altTab");
1590 // Move the mouse over tile 2 and verify the highlight becomes visible
1593 // Move the mouse over tile 2 and verify the highlight becomes visible
1591 var x = 0;
1594 var x = 0;
@@ -1596,10 +1599,10 @@ Rectangle {
1596 mouseMove(shell, x, y)
1599 mouseMove(shell, x, y)
1597 wait(0); // spin the loop so bindings get evaluated
1600 wait(0); // spin the loop so bindings get evaluated
1599− tryCompare(decoratedWindow, "highlightShown", true);
1602+ tryCompare(clippedSpreadDelegate, "highlightShown", true);
1601 // Click the tile
1604 // Click the tile
1602− mouseClick(decoratedWindow, decoratedWindow.width / 2, decoratedWindow.height / 2)
1605+ mouseClick(clippedSpreadDelegate, clippedSpreadDelegate.width / 2, clippedSpreadDelegate.height / 2)
1604 // Verify that we left the spread and app2 is the focused one now
1607 // Verify that we left the spread and app2 is the focused one now
1605 tryCompare(stage, "state", "");
1608 tryCompare(stage, "state", "");