@@ -218,6 +218,19 @@ Rectangle {
222+ anchors { left: parent.left; right: parent.right }
224+ id: autohideLauncherCheckbox
226+ GSettingsController.setAutohideLauncher(checked)
230+ text: "Autohide launcher"
221 Label { text: "Applications"; font.bold: true }
234 Label { text: "Applications"; font.bold: true }
@@ -1652,7 +1665,7 @@ Rectangle {
1652 var x = 0;
1665 var x = 0;
1653 var y = shell.height * .5
1666 var y = shell.height * .5
1654 mouseMove(shell, x, y)
1667 mouseMove(shell, x, y)
1655− while (x <= spreadFlickable.width) {
1668+ while (x <= shell.width) {
1657 mouseMove(shell, x, y)
1670 mouseMove(shell, x, y)
1658 wait(0); // spin the loop so bindings get evaluated
1671 wait(0); // spin the loop so bindings get evaluated
@@ -1726,23 +1739,36 @@ Rectangle {
1726 keyRelease(Qt.Key_Alt);
1739 keyRelease(Qt.Key_Alt);
1729− function test_focusAppFromLauncherExitsSpread() {
1742+ function test_focusAppFromLauncherExitsSpread_data() {
1730− loadDesktopShellWithApps()
1743+ return [
1744+ {tag: "autohide launcher", launcherLocked: false },
1745+ {tag: "locked launcher", launcherLocked: true }
1732− var desktopSpread = findChild(shell, "spread");
1749+ function test_focusAppFromLauncherExitsSpread(data) {
1750+ loadDesktopShellWithApps()
1733 var launcher = findChild(shell, "launcher");
1751 var launcher = findChild(shell, "launcher");
1752+ var desktopSpread = findChild(shell, "spread");
1734 var bfb = findChild(launcher, "buttonShowDashHome");
1753 var bfb = findChild(launcher, "buttonShowDashHome");
1755+ GSettingsController.setAutohideLauncher(!data.launcherLocked);
1756+ waitForRendering(shell);
1736 keyPress(Qt.Key_Alt)
1758 keyPress(Qt.Key_Alt)
1737 keyClick(Qt.Key_Tab);
1759 keyClick(Qt.Key_Tab);
1739 tryCompare(desktopSpread, "state", "altTab")
1761 tryCompare(desktopSpread, "state", "altTab")
1763+ if (!data.launcherLocked) {
1741− revealLauncherByEdgePushWithMouse();
1764+ revealLauncherByEdgePushWithMouse();
1742− waitForRendering(shell)
1765+ waitForRendering(shell)
1744 mouseClick(bfb, bfb.width / 2, bfb.height / 2)
1768 mouseClick(bfb, bfb.width / 2, bfb.height / 2)
1769+ if (!data.launcherLocked) {
1745− tryCompare(launcher, "state", "")
1770+ tryCompare(launcher, "state", "")
1746 tryCompare(desktopSpread, "state", "")
1772 tryCompare(desktopSpread, "state", "")
1748 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash")
1774 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash")
@@ -1957,15 +1983,24 @@ Rectangle {
1986+ function test_superTabToCycleLauncher_data() {
1988+ {tag: "autohide launcher", launcherLocked: false},
1989+ {tag: "locked launcher", launcherLocked: true}
1960− function test_superTabToCycleLauncher() {
1993+ function test_superTabToCycleLauncher(data) {
1961 loadShell("desktop");
1994 loadShell("desktop");
1962 shell.usageScenario = "desktop";
1995 shell.usageScenario = "desktop";
1996+ GSettingsController.setAutohideLauncher(!data.launcherLocked);
1997+ waitForRendering(shell);
1964 var launcher = findChild(shell, "launcher");
1999 var launcher = findChild(shell, "launcher");
1965 var launcherPanel = findChild(launcher, "launcherPanel");
2000 var launcherPanel = findChild(launcher, "launcherPanel");
1966 var firstAppInLauncher = LauncherModel.get(0).appId;
2001 var firstAppInLauncher = LauncherModel.get(0).appId;
1968− compare(launcher.state, "");
2003+ compare(launcher.state, data.launcherLocked ? "visible": "");
1969 compare(launcherPanel.highlightIndex, -2);
2004 compare(launcherPanel.highlightIndex, -2);
1970 compare(ApplicationManager.focusedApplicationId, "unity8-dash");
2005 compare(ApplicationManager.focusedApplicationId, "unity8-dash");
@@ -1977,7 +2012,7 @@ Rectangle {
1977 keyClick(Qt.Key_Tab);
2012 keyClick(Qt.Key_Tab);
1978 tryCompare(launcherPanel, "highlightIndex", 0);
2013 tryCompare(launcherPanel, "highlightIndex", 0);
1979 keyRelease(Qt.Key_Super_L);
2014 keyRelease(Qt.Key_Super_L);
1980− tryCompare(launcher, "state", "");
2015+ tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
1981 tryCompare(launcherPanel, "highlightIndex", -2);
2016 tryCompare(launcherPanel, "highlightIndex", -2);
1982 tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
2017 tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
@@ -1987,7 +2022,7 @@ Rectangle {
1987 tryCompare(launcher, "state", "visible");
2022 tryCompare(launcher, "state", "visible");
1988 tryCompare(launcherPanel, "highlightIndex", -1);
2023 tryCompare(launcherPanel, "highlightIndex", -1);
1989 keyRelease(Qt.Key_Super_L);
2024 keyRelease(Qt.Key_Super_L);
1990− tryCompare(launcher, "state", "");
2025+ tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
1991 tryCompare(launcherPanel, "highlightIndex", -2);
2026 tryCompare(launcherPanel, "highlightIndex", -2);
1992 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
2027 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");