on xenial help sign in
Make sure indicators and launcher hide when power button is pressed on greeter. (LP: #1595569)
commitdc1104590373caaf4e13a254566a4b398a7640f1 authorMichael Terry <michael.terry@canonical.com> dateMon 11 Jul 2016, 17:23 (10 years ago) parent47ffbf2039514c
2 files changed+17−3
qml/Greeter/Greeter.qml+6−3 tests/qmltests/tst_Shell.qml+11
qml/Greeter/Greeter.qml+6−3
@@ -71,11 +71,14 @@ Showable {
7171 d.isLockscreen = true;
7272 }
7373 forcedUnlock = false;
74− if (!required) {
75− showNow(); // loader.onLoaded will select a user
76− } else {
74+ if (required) {
75+ // Normally loader.onLoaded will select a user, but if we're
76+ // already shown, do it manually.
7777 d.selectUser(d.currentIndex, true);
7878 }
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();
7982 }
8083
8184 function notifyAppFocusRequested(appId) {
tests/qmltests/tst_Shell.qml+11
@@ -1161,6 +1161,17 @@ Rectangle {
11611161 tryCompare(indicators, "fullyClosed", true);
11621162 }
11631163
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+
11641175 function test_showAndHideGreeterDBusCalls() {
11651176 loadShell("phone");
11661177 swipeAwayGreeter();