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
1=== modified file 'data/unity8.conf'
2--- data/unity8.conf 2016-03-14 07:30:54 +0000
3+++ data/unity8.conf 2016-06-09 20:57:15 +0000
4@@ -50,9 +50,19 @@
5 # the lag seen in the indicator panel pull-down (LP: #1488327) and also
6 # reduces lag seen in apps:
7 initctl set-env --global QML_NO_TOUCH_COMPRESSION=1
8+
9+ if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then
10+ # On Ubuntu Touch, we currently use a trick where we auto-login the
11+ # user without a LightDM greeter at all. In this case, we want to
12+ # start with the lockscreen visible. Once we switch to using a
13+ # proper greeter for the first login, we can remove this code path.
14+ initctl set-env MODE=full-greeter
15+ else
16+ initctl set-env MODE=full-shell
17+ fi
18 end script
19
20-exec ${BINARY:-unity8} $ARGS
21+exec ${BINARY:-unity8} --mode=$MODE $ARGS
22
23 post-start script
24 initctl emit --no-wait indicator-services-start
25
26=== modified file 'qml/Greeter/Greeter.qml'
27--- qml/Greeter/Greeter.qml 2016-04-27 15:01:10 +0000
28+++ qml/Greeter/Greeter.qml 2016-06-09 20:57:15 +0000
29@@ -60,8 +60,12 @@
30 signal emergencyCall()
31
32 function forceShow() {
33- showNow();
34- d.selectUser(d.currentIndex, true);
35+ forcedUnlock = false;
36+ if (!required) {
37+ showNow(); // loader.onLoaded will select a user
38+ } else {
39+ d.selectUser(d.currentIndex, true);
40+ }
41 }
42
43 function notifyAppFocusRequested(appId) {
44@@ -163,11 +167,14 @@
45 }
46 }
47
48- function checkForcedUnlock() {
49+ function checkForcedUnlock(hideNow) {
50 if (forcedUnlock && shown && loader.item) {
51 // pretend we were just authenticated
52 loader.item.notifyAuthenticationSucceeded();
53 loader.item.hide();
54+ if (hideNow) {
55+ root.hideNow(); // skip hide animation
56+ }
57 }
58 }
59 }
60@@ -178,8 +185,8 @@
61 }
62 }
63
64- onForcedUnlockChanged: d.checkForcedUnlock()
65- Component.onCompleted: d.checkForcedUnlock()
66+ onForcedUnlockChanged: d.checkForcedUnlock(false /* hideNow */)
67+ Component.onCompleted: d.checkForcedUnlock(true /* hideNow */)
68
69 onRequiredChanged: {
70 if (required) {
71@@ -375,10 +382,6 @@
72 }
73
74 onShowMessage: {
75- if (!lightDM.greeter.active) {
76- return; // could happen if hideGreeter() comes in before we prompt
77- }
78-
79 // inefficient, but we only rarely deal with messages
80 var html = text.replace(/&/g, "&")
81 .replace(/</g, "&lt;")
82@@ -388,17 +391,17 @@
83 html = "<font color=\"#df382c\">" + html + "</font>";
84 }
85
86- loader.item.showMessage(html);
87+ if (loader.item) {
88+ loader.item.showMessage(html);
89+ }
90 }
91
92 onShowPrompt: {
93 d.waiting = false;
94
95- if (!lightDM.greeter.active) {
96- return; // could happen if hideGreeter() comes in before we prompt
97+ if (loader.item) {
98+ loader.item.showPrompt(text, isSecret, isDefaultPrompt);
99 }
100-
101- loader.item.showPrompt(text, isSecret, isDefaultPrompt);
102 }
103
104 onAuthenticationComplete: {
105@@ -452,6 +455,7 @@
106 Connections {
107 target: DBusUnitySessionService
108 onLockRequested: root.forceShow()
109+ onUnlocked: root.forcedUnlock = true
110 }
111
112 Binding {
113
114=== modified file 'qml/Shell.qml'
115--- qml/Shell.qml 2016-05-27 13:54:26 +0000
116+++ qml/Shell.qml 2016-06-09 20:57:15 +0000
117@@ -419,7 +419,7 @@
118 hides: [launcher, panel.indicators]
119 tabletMode: shell.usageScenario != "phone"
120 launcherOffset: launcher.progress
121- forcedUnlock: wizard.active
122+ forcedUnlock: wizard.active || shell.mode === "full-shell"
123 background: wallpaperResolver.background
124
125 // avoid overlapping with Launcher's edge drag area
126
127=== modified file 'tests/qmltests/tst_Shell.qml'
128--- tests/qmltests/tst_Shell.qml 2016-05-27 13:51:53 +0000
129+++ tests/qmltests/tst_Shell.qml 2016-06-09 20:57:15 +0000
130@@ -65,6 +65,7 @@
131 property int shellOrientation: Qt.PortraitOrientation
132 property int nativeOrientation: Qt.PortraitOrientation
133 property int primaryOrientation: Qt.PortraitOrientation
134+ property string mode: "full-greeter"
135
136 state: "phone"
137 states: [
138@@ -114,6 +115,7 @@
139 native_: shellLoader.nativeOrientation
140 primary: shellLoader.primaryOrientation
141 }
142+ mode: shellLoader.mode
143 Component.onDestruction: {
144 shellLoader.itemDestroyed = true;
145 }
146@@ -508,6 +510,7 @@
147 AccountsService.demoEdges = false;
148 AccountsService.demoEdgesCompleted = [];
149 Wizard.System.wizardEnabled = false;
150+ shellLoader.mode = "full-greeter";
151
152 // kill all (fake) running apps
153 killApps();
154@@ -2454,5 +2457,22 @@
155
156 tryCompare(appDelegate, "state", "normal");
157 }
158+
159+ function test_fullShellModeHasNoInitialGreeter() {
160+ setLightDMMockMode("single-pin");
161+ shellLoader.mode = "full-shell";
162+ loadShell("phone");
163+ shell.usageScenario = "phone";
164+ waitForRendering(shell);
165+
166+ var greeter = findChild(shell, "greeter");
167+ verify(!greeter.shown);
168+ verify(!greeter.locked);
169+
170+ showGreeter();
171+
172+ verify(greeter.shown);
173+ verify(greeter.locked);
174+ }
175 }
176 }

Subscribers

People subscribed via source and target branches