@@ -1574,18 +1574,21 @@ Rectangle {
15741574 function test_selectFromSpreadWithMouse(data) {
15751575 loadDesktopShellWithApps()
15761576
1577− var appRepeater = findInvisibleChild(shell, "appRepeater");
1578− verify(appRepeater !== null);
1577+ var stage = findChild(shell, "stage");
1578+ var spread = findChild(stage, "spread");
1579+ waitForRendering(spread)
1580+
1581+ var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1582+ verify(spreadRepeater !== null);
15791583
15801584 keyPress(Qt.Key_Control)
15811585 keyClick(Qt.Key_Tab);
15821586
15831587 var focusAppId = ApplicationManager.get(2).appId;
1584− var appDelegate2 = appRepeater.itemAt(2);
1585− var decoratedWindow = findChild(appDelegate2, "decoratedWindow");
1586− var stage = findChild(shell, "stage");
1588+ var spreadDelegate2 = spreadRepeater.itemAt(2);
1589+ var clippedSpreadDelegate = findChild(spreadDelegate2, "clippedSpreadDelegate");
15871590
1588− tryCompare(stage, "state", "altTab");
1591+ tryCompare(spread, "state", "altTab");
15891592
15901593 // Move the mouse over tile 2 and verify the highlight becomes visible
15911594 var x = 0;
@@ -1596,10 +1599,10 @@ Rectangle {
15961599 mouseMove(shell, x, y)
15971600 wait(0); // spin the loop so bindings get evaluated
15981601 }
1599− tryCompare(decoratedWindow, "highlightShown", true);
1602+ tryCompare(clippedSpreadDelegate, "highlightShown", true);
16001603
16011604 // Click the tile
1602− mouseClick(decoratedWindow, decoratedWindow.width / 2, decoratedWindow.height / 2)
1605+ mouseClick(clippedSpreadDelegate, clippedSpreadDelegate.width / 2, clippedSpreadDelegate.height / 2)
16031606
16041607 // Verify that we left the spread and app2 is the focused one now
16051608 tryCompare(stage, "state", "");