on xenial help sign in
don't hide the launcher on super press if it's locked visible
297aa84Michael 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
@@ -1542,5 +1542,17 @@ Rectangle {
1542 tryCompare(launcher, "maxPanelX", 0);
1542 tryCompare(launcher, "maxPanelX", 0);
1543 launcher.panelWidth = oldSize;
1543 launcher.panelWidth = oldSize;
1544 }
1544 }
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+ }
1545 }
1557 }
1546}
1558}