on xenial help sign in
Make sure we hide indicators/launcher when greeter is asked to be shown
commitbb892720177c7ddd53c0f1fa8d5ab4fb9c2043ad authorMichael Terry <michael.terry@canonical.com> dateThu 30 Jun 2016, 09:25 (10 years ago) parent7e5220e
2 files changed+17−3
qml/Greeter/Greeter.qml+6−3 tests/qmltests/tst_Shell.qml+11
qml/Greeter/Greeter.qml+6−3
@@ -69,11 +69,14 @@ Showable {
6969 d.isLockscreen = true;
7070 }
7171 forcedUnlock = false;
72− if (!required) {
73− showNow(); // loader.onLoaded will select a user
74− } else {
72+ if (required) {
73+ // Normally loader.onLoaded will select a user, but if we're
74+ // already shown, do it manually.
7575 d.selectUser(d.currentIndex, true);
7676 }
77+ // Even though we may already be shown, we want to call show() for its
78+ // possible side effects, like hiding indicators and such.
79+ showNow();
7780 }
7881
7982 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();