on xenial help sign in
Make sure that there is no window of opportunity for swiping away greeter before the lockscreen appears.

We actually have code to do this already, but it only protected starting from the greeter's onShowChanged call. So this branch starts the shell disabled from the get-go. Fixes: #1395075 Approved by: Albert Astals Cid

commit5e5019a69bf82d749461715a5254060342314e29 authorMichael Terry <michael.terry@canonical.com> dateTue 2 Dec 2014, 09:25 (12 years ago) parent3a5de522255cd7
4 files changed+8−1
qml/Shell.qml+5−1 tests/qmltests/tst_Shell.qml+1 tests/qmltests/tst_ShellWithPin.qml+1 tests/qmltests/tst_TabletShell.qml+1
qml/Shell.qml+5−1
@@ -44,6 +44,10 @@ import Unity.DashCommunicator 0.1
4444Item {
4545 id: shell
4646
47+ // Disable everything so that user can't swipe greeter or launcher until
48+ // we get first prompt/authenticate, which will re-enable the shell.
49+ enabled: false
50+
4751 // this is only here to select the width / height of the window if not running fullscreen
4852 property bool tablet: false
4953 width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
@@ -574,7 +578,7 @@ Item {
574578 onShownChanged: {
575579 if (shown) {
576580 // Disable everything so that user can't swipe greeter or
577− // launcher until we get first prompt/authenticate, which
581+ // launcher until we get the next prompt/authenticate, which
578582 // will re-enable the shell.
579583 shell.enabled = false;
580584
tests/qmltests/tst_Shell.qml+1
@@ -194,6 +194,7 @@ Item {
194194 killApps(ApplicationManager);
195195
196196 unlockAllModemsSpy.clear()
197+ LightDM.Greeter.authenticate(""); // reset greeter
197198
198199 // reload our test subject to get it in a fresh state once again
199200 shellLoader.active = true;
tests/qmltests/tst_ShellWithPin.qml+1
@@ -161,6 +161,7 @@ Item {
161161 AccountsService.enableIndicatorsWhileLocked = true
162162 AccountsService.demoEdges = false
163163 callManager.foregroundCall = null
164+ LightDM.Greeter.authenticate(""); // reset greeter
164165
165166 // reload our test subject to get it in a fresh state once again
166167 shellLoader.active = true
tests/qmltests/tst_TabletShell.qml+1
@@ -149,6 +149,7 @@ Row {
149149
150150 unlockAllModemsSpy.clear()
151151 AccountsService.demoEdges = false
152+ LightDM.Greeter.authenticate(""); // reset greeter
152153
153154 // reload our test subject to get it in a fresh state once again
154155 shellLoader.active = true