Merge lp:~mterry/unity8/no-double-lockscreen into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2447
Merged at revision: 2481
Proposed branch: lp:~mterry/unity8/no-double-lockscreen
Merge into: lp:unity8
Diff against target: 176 lines (+50/-16)
4 files modified
data/unity8.conf (+11/-1)
qml/Greeter/Greeter.qml (+18/-14)
qml/Shell.qml (+1/-1)
tests/qmltests/tst_Shell.qml (+20/-0)
To merge this branch: bzr merge lp:~mterry/unity8/no-double-lockscreen
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Lukáš Tinkl (community) Approve
Review via email: mp+296946@code.launchpad.net

Commit message

Stop showing an extra lockscreen in desktop unity8 sessions.

We do that by implementing --mode=full-shell and using it by default in non-Touch environments. Eventually we'll use it everywhere, once Touch uses a proper greeter.

Description of the change

= Checklist =

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 Yes, on desktop and phone.

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 NA

 * If you changed the UI, has there been a design review?
 NA

To post a comment you must log in.
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Just one minor nit, otherwise the code looks logical and straighforward

2443. By Michael Terry

Add missing braces

2444. By Michael Terry

Add test; fix lock state resetting when in full-shell

Revision history for this message
Michael Terry (mterry) wrote :

Fixed and test added.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2442
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1451/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/1929
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/990
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/990
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/990
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1955
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1890
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1890
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1890
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1881/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1881
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1881/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1451/rebuild

review: Needs Fixing (continuous-integration)
2445. By Michael Terry

And unlock when lightdm is acting as our lockscreen

2446. By Michael Terry

Fix delay on lockscreen before you can log in

2447. By Michael Terry

Do previous fix a cleaner way

Revision history for this message
Michael Terry (mterry) wrote :

Fixed your issue with the lock prompt delaying for a bit with a Retry text.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2444
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1456/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/1934
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/996
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/996
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/996
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1960
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1895
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1895
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1895
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1886
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1886/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1886
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1886/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1886
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1886/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1886
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1886/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1886
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1886/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1886
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1886/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1886
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1886/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1886
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1886/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1886
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1886/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1456/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Good enough, fixes what it promises to, thanks :)

Let's wait for the CI to top-approve

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2447
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1460/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/1948
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/999
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/999
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/999
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1974
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1908
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1908
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1908
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1899/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1899
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1899/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1460/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

One test failure, but it looks unrelated.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/unity8.conf'
--- data/unity8.conf 2016-03-14 07:30:54 +0000
+++ data/unity8.conf 2016-06-09 20:57:15 +0000
@@ -50,9 +50,19 @@
50 # the lag seen in the indicator panel pull-down (LP: #1488327) and also50 # the lag seen in the indicator panel pull-down (LP: #1488327) and also
51 # reduces lag seen in apps:51 # reduces lag seen in apps:
52 initctl set-env --global QML_NO_TOUCH_COMPRESSION=152 initctl set-env --global QML_NO_TOUCH_COMPRESSION=1
53
54 if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then
55 # On Ubuntu Touch, we currently use a trick where we auto-login the
56 # user without a LightDM greeter at all. In this case, we want to
57 # start with the lockscreen visible. Once we switch to using a
58 # proper greeter for the first login, we can remove this code path.
59 initctl set-env MODE=full-greeter
60 else
61 initctl set-env MODE=full-shell
62 fi
53end script63end script
5464
55exec ${BINARY:-unity8} $ARGS65exec ${BINARY:-unity8} --mode=$MODE $ARGS
5666
57post-start script67post-start script
58 initctl emit --no-wait indicator-services-start68 initctl emit --no-wait indicator-services-start
5969
=== modified file 'qml/Greeter/Greeter.qml'
--- qml/Greeter/Greeter.qml 2016-04-27 15:01:10 +0000
+++ qml/Greeter/Greeter.qml 2016-06-09 20:57:15 +0000
@@ -60,8 +60,12 @@
60 signal emergencyCall()60 signal emergencyCall()
6161
62 function forceShow() {62 function forceShow() {
63 showNow();63 forcedUnlock = false;
64 d.selectUser(d.currentIndex, true);64 if (!required) {
65 showNow(); // loader.onLoaded will select a user
66 } else {
67 d.selectUser(d.currentIndex, true);
68 }
65 }69 }
6670
67 function notifyAppFocusRequested(appId) {71 function notifyAppFocusRequested(appId) {
@@ -163,11 +167,14 @@
163 }167 }
164 }168 }
165169
166 function checkForcedUnlock() {170 function checkForcedUnlock(hideNow) {
167 if (forcedUnlock && shown && loader.item) {171 if (forcedUnlock && shown && loader.item) {
168 // pretend we were just authenticated172 // pretend we were just authenticated
169 loader.item.notifyAuthenticationSucceeded();173 loader.item.notifyAuthenticationSucceeded();
170 loader.item.hide();174 loader.item.hide();
175 if (hideNow) {
176 root.hideNow(); // skip hide animation
177 }
171 }178 }
172 }179 }
173 }180 }
@@ -178,8 +185,8 @@
178 }185 }
179 }186 }
180187
181 onForcedUnlockChanged: d.checkForcedUnlock()188 onForcedUnlockChanged: d.checkForcedUnlock(false /* hideNow */)
182 Component.onCompleted: d.checkForcedUnlock()189 Component.onCompleted: d.checkForcedUnlock(true /* hideNow */)
183190
184 onRequiredChanged: {191 onRequiredChanged: {
185 if (required) {192 if (required) {
@@ -375,10 +382,6 @@
375 }382 }
376383
377 onShowMessage: {384 onShowMessage: {
378 if (!lightDM.greeter.active) {
379 return; // could happen if hideGreeter() comes in before we prompt
380 }
381
382 // inefficient, but we only rarely deal with messages385 // inefficient, but we only rarely deal with messages
383 var html = text.replace(/&/g, "&")386 var html = text.replace(/&/g, "&")
384 .replace(/</g, "&lt;")387 .replace(/</g, "&lt;")
@@ -388,17 +391,17 @@
388 html = "<font color=\"#df382c\">" + html + "</font>";391 html = "<font color=\"#df382c\">" + html + "</font>";
389 }392 }
390393
391 loader.item.showMessage(html);394 if (loader.item) {
395 loader.item.showMessage(html);
396 }
392 }397 }
393398
394 onShowPrompt: {399 onShowPrompt: {
395 d.waiting = false;400 d.waiting = false;
396401
397 if (!lightDM.greeter.active) {402 if (loader.item) {
398 return; // could happen if hideGreeter() comes in before we prompt403 loader.item.showPrompt(text, isSecret, isDefaultPrompt);
399 }404 }
400
401 loader.item.showPrompt(text, isSecret, isDefaultPrompt);
402 }405 }
403406
404 onAuthenticationComplete: {407 onAuthenticationComplete: {
@@ -452,6 +455,7 @@
452 Connections {455 Connections {
453 target: DBusUnitySessionService456 target: DBusUnitySessionService
454 onLockRequested: root.forceShow()457 onLockRequested: root.forceShow()
458 onUnlocked: root.forcedUnlock = true
455 }459 }
456460
457 Binding {461 Binding {
458462
=== modified file 'qml/Shell.qml'
--- qml/Shell.qml 2016-05-27 13:54:26 +0000
+++ qml/Shell.qml 2016-06-09 20:57:15 +0000
@@ -419,7 +419,7 @@
419 hides: [launcher, panel.indicators]419 hides: [launcher, panel.indicators]
420 tabletMode: shell.usageScenario != "phone"420 tabletMode: shell.usageScenario != "phone"
421 launcherOffset: launcher.progress421 launcherOffset: launcher.progress
422 forcedUnlock: wizard.active422 forcedUnlock: wizard.active || shell.mode === "full-shell"
423 background: wallpaperResolver.background423 background: wallpaperResolver.background
424424
425 // avoid overlapping with Launcher's edge drag area425 // avoid overlapping with Launcher's edge drag area
426426
=== modified file 'tests/qmltests/tst_Shell.qml'
--- tests/qmltests/tst_Shell.qml 2016-05-27 13:51:53 +0000
+++ tests/qmltests/tst_Shell.qml 2016-06-09 20:57:15 +0000
@@ -65,6 +65,7 @@
65 property int shellOrientation: Qt.PortraitOrientation65 property int shellOrientation: Qt.PortraitOrientation
66 property int nativeOrientation: Qt.PortraitOrientation66 property int nativeOrientation: Qt.PortraitOrientation
67 property int primaryOrientation: Qt.PortraitOrientation67 property int primaryOrientation: Qt.PortraitOrientation
68 property string mode: "full-greeter"
6869
69 state: "phone"70 state: "phone"
70 states: [71 states: [
@@ -114,6 +115,7 @@
114 native_: shellLoader.nativeOrientation115 native_: shellLoader.nativeOrientation
115 primary: shellLoader.primaryOrientation116 primary: shellLoader.primaryOrientation
116 }117 }
118 mode: shellLoader.mode
117 Component.onDestruction: {119 Component.onDestruction: {
118 shellLoader.itemDestroyed = true;120 shellLoader.itemDestroyed = true;
119 }121 }
@@ -508,6 +510,7 @@
508 AccountsService.demoEdges = false;510 AccountsService.demoEdges = false;
509 AccountsService.demoEdgesCompleted = [];511 AccountsService.demoEdgesCompleted = [];
510 Wizard.System.wizardEnabled = false;512 Wizard.System.wizardEnabled = false;
513 shellLoader.mode = "full-greeter";
511514
512 // kill all (fake) running apps515 // kill all (fake) running apps
513 killApps();516 killApps();
@@ -2454,5 +2457,22 @@
24542457
2455 tryCompare(appDelegate, "state", "normal");2458 tryCompare(appDelegate, "state", "normal");
2456 }2459 }
2460
2461 function test_fullShellModeHasNoInitialGreeter() {
2462 setLightDMMockMode("single-pin");
2463 shellLoader.mode = "full-shell";
2464 loadShell("phone");
2465 shell.usageScenario = "phone";
2466 waitForRendering(shell);
2467
2468 var greeter = findChild(shell, "greeter");
2469 verify(!greeter.shown);
2470 verify(!greeter.locked);
2471
2472 showGreeter();
2473
2474 verify(greeter.shown);
2475 verify(greeter.locked);
2476 }
2457 }2477 }
2458}2478}

Subscribers

People subscribed via source and target branches