on xenial help sign in
Make sure indicators and launcher hide when power button is pressed on greeter. (LP: #1595569)
dc11045Michael Terry
qml/Greeter/Greeter.qml+6−3
@@ -71,11 +71,14 @@ Showable {
71 d.isLockscreen = true;
71 d.isLockscreen = true;
72 }
72 }
73 forcedUnlock = false;
73 forcedUnlock = false;
74− if (!required) {
74+ if (required) {
75− showNow(); // loader.onLoaded will select a user
75+ // Normally loader.onLoaded will select a user, but if we're
76− } else {
76+ // already shown, do it manually.
77 d.selectUser(d.currentIndex, true);
77 d.selectUser(d.currentIndex, true);
78 }
78 }
79+ // Even though we may already be shown, we want to call show() for its
80+ // possible side effects, like hiding indicators and such.
81+ showNow();
79 }
82 }
80
83
81 function notifyAppFocusRequested(appId) {
84 function notifyAppFocusRequested(appId) {
tests/qmltests/tst_Shell.qml+11
@@ -1161,6 +1161,17 @@ Rectangle {
1161 tryCompare(indicators, "fullyClosed", true);
1161 tryCompare(indicators, "fullyClosed", true);
1162 }
1162 }
1163
1163
1164+ function test_greeterShownAgainHidesIndicators() {
1165+ // Regression test for https://launchpad.net/bugs/1595569
1166+
1167+ loadShell("phone");
1168+ showIndicators();
1169+ showGreeter();
1170+
1171+ var indicators = findChild(shell, "indicators");
1172+ tryCompare(indicators, "fullyClosed", true);
1173+ }
1174+
1164 function test_showAndHideGreeterDBusCalls() {
1175 function test_showAndHideGreeterDBusCalls() {
1165 loadShell("phone");
1176 loadShell("phone");
1166 swipeAwayGreeter();
1177 swipeAwayGreeter();