on xenial help sign in
fix interacting with the launcher when spread is open, add test for it
56d10eeMichael Zanetti
qml/Stages/DesktopSpread.qml+5
@@ -75,6 +75,11 @@ FocusScope {
75 }
75 }
76 }
76 }
77
77
78+ function cancel() {
79+ spreadRepeater.highlightedIndex = -1;
80+ state = ""
81+ }
82+
78 Item {
83 Item {
79 id: spreadContainer
84 id: spreadContainer
80 objectName: "spreadContainer"
85 objectName: "spreadContainer"
qml/Stages/DesktopStage.qml+4
@@ -71,6 +71,10 @@ Rectangle {
71 var appDelegate = appRepeater.itemAt(appIndex);
71 var appDelegate = appRepeater.itemAt(appIndex);
72 appDelegate.minimized = false;
72 appDelegate.minimized = false;
73 ApplicationManager.focusApplication(appId)
73 ApplicationManager.focusApplication(appId)
74+
75+ if (spread.state == "altTab") {
76+ spread.cancel()
77+ }
74 }
78 }
75 }
79 }
76
80
tests/qmltests/tst_Shell.qml+25−1
@@ -1626,7 +1626,6 @@ Rectangle {
1626 keyClick(Qt.Key_Tab);
1626 keyClick(Qt.Key_Tab);
1627
1627
1628 var spreadFlickable = findChild(shell, "spreadFlickable")
1628 var spreadFlickable = findChild(shell, "spreadFlickable")
1629− print("have flickable", spreadFlickable, spreadFlickable.contentX)
1630
1629
1631 compare(spreadFlickable.contentX, 0);
1630 compare(spreadFlickable.contentX, 0);
1632
1631
@@ -1707,5 +1706,30 @@ Rectangle {
1707
1706
1708 keyRelease(Qt.Key_Control);
1707 keyRelease(Qt.Key_Control);
1709 }
1708 }
1709+
1710+ function test_focusAppFromLauncherExitsSpread() {
1711+ loadDesktopShellWithApps()
1712+
1713+ var desktopSpread = findChild(shell, "spread");
1714+ var launcher = findChild(shell, "launcher");
1715+ var bfb = findChild(launcher, "buttonShowDashHome");
1716+
1717+ keyPress(Qt.Key_Control)
1718+ keyClick(Qt.Key_Tab);
1719+
1720+
1721+ tryCompare(desktopSpread, "state", "altTab")
1722+
1723+ mouseMove(shell, 0, 0);
1724+ tryCompare(launcher, "state", "visibleTemporary")
1725+
1726+ mouseClick(bfb, bfb.width / 2, bfb.height / 2)
1727+ tryCompare(launcher, "state", "")
1728+ tryCompare(desktopSpread, "state", "")
1729+
1730+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash")
1731+
1732+ keyRelease(Qt.Key_Control);
1733+ }
1710 }
1734 }
1711}
1735}