on xenial help sign in
fix interacting with the launcher when spread is open, add test for it
commit56d10ee2decd80d81e6f821426d6adb7c0a818be authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 18 Sep 2015, 14:05 (11 years ago) parent9f6da52
3 files changed+34−1
qml/Stages/DesktopSpread.qml+5 qml/Stages/DesktopStage.qml+4 tests/qmltests/tst_Shell.qml+25−1
qml/Stages/DesktopSpread.qml+5
@@ -75,6 +75,11 @@ FocusScope {
7575 }
7676 }
7777
78+ function cancel() {
79+ spreadRepeater.highlightedIndex = -1;
80+ state = ""
81+ }
82+
7883 Item {
7984 id: spreadContainer
8085 objectName: "spreadContainer"
qml/Stages/DesktopStage.qml+4
@@ -71,6 +71,10 @@ Rectangle {
7171 var appDelegate = appRepeater.itemAt(appIndex);
7272 appDelegate.minimized = false;
7373 ApplicationManager.focusApplication(appId)
74+
75+ if (spread.state == "altTab") {
76+ spread.cancel()
77+ }
7478 }
7579 }
7680
tests/qmltests/tst_Shell.qml+25−1
@@ -1626,7 +1626,6 @@ Rectangle {
16261626 keyClick(Qt.Key_Tab);
16271627
16281628 var spreadFlickable = findChild(shell, "spreadFlickable")
1629− print("have flickable", spreadFlickable, spreadFlickable.contentX)
16301629
16311630 compare(spreadFlickable.contentX, 0);
16321631
@@ -1707,5 +1706,30 @@ Rectangle {
17071706
17081707 keyRelease(Qt.Key_Control);
17091708 }
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+ }
17101734 }
17111735}