on xenial help sign in
Don't hide the launcher on super press if it's locked visible (LP: #1675373)
14a6cd4Michael Zanetti
qml/Launcher/Launcher.qml+2−2
@@ -75,7 +75,7 @@ FocusScope {
75 } else {
75 } else {
76 superPressTimer.stop();
76 superPressTimer.stop();
77 superLongPressTimer.stop();
77 superLongPressTimer.stop();
78− switchToNextState("");
78+ switchToNextState(root.lockedVisible ? "visible" : "");
79 panel.shortcutHintsShown = false;
79 panel.shortcutHintsShown = false;
80 }
80 }
81 }
81 }
@@ -88,7 +88,7 @@ FocusScope {
88 superPressTimer.stop();
88 superPressTimer.stop();
89 superLongPressTimer.stop();
89 superLongPressTimer.stop();
90 } else {
90 } else {
91− switchToNextState("");
91+ switchToNextState(root.lockedVisible ? "visible" : "");
92 root.focus = false;
92 root.focus = false;
93 if (panel.highlightIndex == -1) {
93 if (panel.highlightIndex == -1) {
94 root.showDashHome();
94 root.showDashHome();
tests/qmltests/Launcher/tst_Launcher.qml+12
@@ -1543,6 +1543,18 @@ Rectangle {
1543 launcher.panelWidth = oldSize;
1543 launcher.panelWidth = oldSize;
1544 }
1544 }
1545
1545
1546+ function test_doesntHideOnSuperWhenLockedVisible() {
1547+ launcher.lockedVisible = true;
1548+
1549+ waitForRendering(launcher);
1550+ launcher.superPressed = true;
1551+ wait(400); // Longpress
1552+ launcher.superPressed = false;
1553+ waitForRendering(launcher);
1554+
1555+ verify(launcher.state, "visible");
1556+ }
1557+
1546 function test_mouseHoverSelectQuickList() {
1558 function test_mouseHoverSelectQuickList() {
1547 dragLauncherIntoView();
1559 dragLauncherIntoView();
1548 var clickedItem = findChild(launcher, "launcherDelegate5")
1560 var clickedItem = findChild(launcher, "launcherDelegate5")