Merge lp:~mterry/unity8/no-double-lockscreen into lp:unity8
- no-double-lockscreen
- Merge into trunk
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 |
Related bugs: |
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
Lukáš Tinkl (lukas-kde) wrote : | # |
- 2443. By Michael Terry
-
Add missing braces
- 2444. By Michael Terry
-
Add test; fix lock state resetting when in full-shell
Michael Terry (mterry) wrote : | # |
Fixed and test added.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2442
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 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
Michael Terry (mterry) wrote : | # |
Fixed your issue with the lock prompt delaying for a bit with a Retry text.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2444
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : | # |
Good enough, fixes what it promises to, thanks :)
Let's wait for the CI to top-approve
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2447
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Michael Terry (mterry) wrote : | # |
One test failure, but it looks unrelated.
Preview Diff
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 | 50 | # the lag seen in the indicator panel pull-down (LP: #1488327) and also | 50 | # the lag seen in the indicator panel pull-down (LP: #1488327) and also |
6 | 51 | # reduces lag seen in apps: | 51 | # reduces lag seen in apps: |
7 | 52 | initctl set-env --global QML_NO_TOUCH_COMPRESSION=1 | 52 | initctl set-env --global QML_NO_TOUCH_COMPRESSION=1 |
8 | 53 | |||
9 | 54 | if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then | ||
10 | 55 | # On Ubuntu Touch, we currently use a trick where we auto-login the | ||
11 | 56 | # user without a LightDM greeter at all. In this case, we want to | ||
12 | 57 | # start with the lockscreen visible. Once we switch to using a | ||
13 | 58 | # proper greeter for the first login, we can remove this code path. | ||
14 | 59 | initctl set-env MODE=full-greeter | ||
15 | 60 | else | ||
16 | 61 | initctl set-env MODE=full-shell | ||
17 | 62 | fi | ||
18 | 53 | end script | 63 | end script |
19 | 54 | 64 | ||
21 | 55 | exec ${BINARY:-unity8} $ARGS | 65 | exec ${BINARY:-unity8} --mode=$MODE $ARGS |
22 | 56 | 66 | ||
23 | 57 | post-start script | 67 | post-start script |
24 | 58 | initctl emit --no-wait indicator-services-start | 68 | initctl emit --no-wait indicator-services-start |
25 | 59 | 69 | ||
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 | 60 | signal emergencyCall() | 60 | signal emergencyCall() |
31 | 61 | 61 | ||
32 | 62 | function forceShow() { | 62 | function forceShow() { |
35 | 63 | showNow(); | 63 | forcedUnlock = false; |
36 | 64 | d.selectUser(d.currentIndex, true); | 64 | if (!required) { |
37 | 65 | showNow(); // loader.onLoaded will select a user | ||
38 | 66 | } else { | ||
39 | 67 | d.selectUser(d.currentIndex, true); | ||
40 | 68 | } | ||
41 | 65 | } | 69 | } |
42 | 66 | 70 | ||
43 | 67 | function notifyAppFocusRequested(appId) { | 71 | function notifyAppFocusRequested(appId) { |
44 | @@ -163,11 +167,14 @@ | |||
45 | 163 | } | 167 | } |
46 | 164 | } | 168 | } |
47 | 165 | 169 | ||
49 | 166 | function checkForcedUnlock() { | 170 | function checkForcedUnlock(hideNow) { |
50 | 167 | if (forcedUnlock && shown && loader.item) { | 171 | if (forcedUnlock && shown && loader.item) { |
51 | 168 | // pretend we were just authenticated | 172 | // pretend we were just authenticated |
52 | 169 | loader.item.notifyAuthenticationSucceeded(); | 173 | loader.item.notifyAuthenticationSucceeded(); |
53 | 170 | loader.item.hide(); | 174 | loader.item.hide(); |
54 | 175 | if (hideNow) { | ||
55 | 176 | root.hideNow(); // skip hide animation | ||
56 | 177 | } | ||
57 | 171 | } | 178 | } |
58 | 172 | } | 179 | } |
59 | 173 | } | 180 | } |
60 | @@ -178,8 +185,8 @@ | |||
61 | 178 | } | 185 | } |
62 | 179 | } | 186 | } |
63 | 180 | 187 | ||
66 | 181 | onForcedUnlockChanged: d.checkForcedUnlock() | 188 | onForcedUnlockChanged: d.checkForcedUnlock(false /* hideNow */) |
67 | 182 | Component.onCompleted: d.checkForcedUnlock() | 189 | Component.onCompleted: d.checkForcedUnlock(true /* hideNow */) |
68 | 183 | 190 | ||
69 | 184 | onRequiredChanged: { | 191 | onRequiredChanged: { |
70 | 185 | if (required) { | 192 | if (required) { |
71 | @@ -375,10 +382,6 @@ | |||
72 | 375 | } | 382 | } |
73 | 376 | 383 | ||
74 | 377 | onShowMessage: { | 384 | onShowMessage: { |
75 | 378 | if (!lightDM.greeter.active) { | ||
76 | 379 | return; // could happen if hideGreeter() comes in before we prompt | ||
77 | 380 | } | ||
78 | 381 | |||
79 | 382 | // inefficient, but we only rarely deal with messages | 385 | // inefficient, but we only rarely deal with messages |
80 | 383 | var html = text.replace(/&/g, "&") | 386 | var html = text.replace(/&/g, "&") |
81 | 384 | .replace(/</g, "<") | 387 | .replace(/</g, "<") |
82 | @@ -388,17 +391,17 @@ | |||
83 | 388 | html = "<font color=\"#df382c\">" + html + "</font>"; | 391 | html = "<font color=\"#df382c\">" + html + "</font>"; |
84 | 389 | } | 392 | } |
85 | 390 | 393 | ||
87 | 391 | loader.item.showMessage(html); | 394 | if (loader.item) { |
88 | 395 | loader.item.showMessage(html); | ||
89 | 396 | } | ||
90 | 392 | } | 397 | } |
91 | 393 | 398 | ||
92 | 394 | onShowPrompt: { | 399 | onShowPrompt: { |
93 | 395 | d.waiting = false; | 400 | d.waiting = false; |
94 | 396 | 401 | ||
97 | 397 | if (!lightDM.greeter.active) { | 402 | if (loader.item) { |
98 | 398 | return; // could happen if hideGreeter() comes in before we prompt | 403 | loader.item.showPrompt(text, isSecret, isDefaultPrompt); |
99 | 399 | } | 404 | } |
100 | 400 | |||
101 | 401 | loader.item.showPrompt(text, isSecret, isDefaultPrompt); | ||
102 | 402 | } | 405 | } |
103 | 403 | 406 | ||
104 | 404 | onAuthenticationComplete: { | 407 | onAuthenticationComplete: { |
105 | @@ -452,6 +455,7 @@ | |||
106 | 452 | Connections { | 455 | Connections { |
107 | 453 | target: DBusUnitySessionService | 456 | target: DBusUnitySessionService |
108 | 454 | onLockRequested: root.forceShow() | 457 | onLockRequested: root.forceShow() |
109 | 458 | onUnlocked: root.forcedUnlock = true | ||
110 | 455 | } | 459 | } |
111 | 456 | 460 | ||
112 | 457 | Binding { | 461 | Binding { |
113 | 458 | 462 | ||
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 | 419 | hides: [launcher, panel.indicators] | 419 | hides: [launcher, panel.indicators] |
119 | 420 | tabletMode: shell.usageScenario != "phone" | 420 | tabletMode: shell.usageScenario != "phone" |
120 | 421 | launcherOffset: launcher.progress | 421 | launcherOffset: launcher.progress |
122 | 422 | forcedUnlock: wizard.active | 422 | forcedUnlock: wizard.active || shell.mode === "full-shell" |
123 | 423 | background: wallpaperResolver.background | 423 | background: wallpaperResolver.background |
124 | 424 | 424 | ||
125 | 425 | // avoid overlapping with Launcher's edge drag area | 425 | // avoid overlapping with Launcher's edge drag area |
126 | 426 | 426 | ||
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 | 65 | property int shellOrientation: Qt.PortraitOrientation | 65 | property int shellOrientation: Qt.PortraitOrientation |
132 | 66 | property int nativeOrientation: Qt.PortraitOrientation | 66 | property int nativeOrientation: Qt.PortraitOrientation |
133 | 67 | property int primaryOrientation: Qt.PortraitOrientation | 67 | property int primaryOrientation: Qt.PortraitOrientation |
134 | 68 | property string mode: "full-greeter" | ||
135 | 68 | 69 | ||
136 | 69 | state: "phone" | 70 | state: "phone" |
137 | 70 | states: [ | 71 | states: [ |
138 | @@ -114,6 +115,7 @@ | |||
139 | 114 | native_: shellLoader.nativeOrientation | 115 | native_: shellLoader.nativeOrientation |
140 | 115 | primary: shellLoader.primaryOrientation | 116 | primary: shellLoader.primaryOrientation |
141 | 116 | } | 117 | } |
142 | 118 | mode: shellLoader.mode | ||
143 | 117 | Component.onDestruction: { | 119 | Component.onDestruction: { |
144 | 118 | shellLoader.itemDestroyed = true; | 120 | shellLoader.itemDestroyed = true; |
145 | 119 | } | 121 | } |
146 | @@ -508,6 +510,7 @@ | |||
147 | 508 | AccountsService.demoEdges = false; | 510 | AccountsService.demoEdges = false; |
148 | 509 | AccountsService.demoEdgesCompleted = []; | 511 | AccountsService.demoEdgesCompleted = []; |
149 | 510 | Wizard.System.wizardEnabled = false; | 512 | Wizard.System.wizardEnabled = false; |
150 | 513 | shellLoader.mode = "full-greeter"; | ||
151 | 511 | 514 | ||
152 | 512 | // kill all (fake) running apps | 515 | // kill all (fake) running apps |
153 | 513 | killApps(); | 516 | killApps(); |
154 | @@ -2454,5 +2457,22 @@ | |||
155 | 2454 | 2457 | ||
156 | 2455 | tryCompare(appDelegate, "state", "normal"); | 2458 | tryCompare(appDelegate, "state", "normal"); |
157 | 2456 | } | 2459 | } |
158 | 2460 | |||
159 | 2461 | function test_fullShellModeHasNoInitialGreeter() { | ||
160 | 2462 | setLightDMMockMode("single-pin"); | ||
161 | 2463 | shellLoader.mode = "full-shell"; | ||
162 | 2464 | loadShell("phone"); | ||
163 | 2465 | shell.usageScenario = "phone"; | ||
164 | 2466 | waitForRendering(shell); | ||
165 | 2467 | |||
166 | 2468 | var greeter = findChild(shell, "greeter"); | ||
167 | 2469 | verify(!greeter.shown); | ||
168 | 2470 | verify(!greeter.locked); | ||
169 | 2471 | |||
170 | 2472 | showGreeter(); | ||
171 | 2473 | |||
172 | 2474 | verify(greeter.shown); | ||
173 | 2475 | verify(greeter.locked); | ||
174 | 2476 | } | ||
175 | 2457 | } | 2477 | } |
176 | 2458 | } | 2478 | } |
Just one minor nit, otherwise the code looks logical and straighforward