on xenial help sign in
Consolidate app-switching logic
ca39b8bMichael Terry
qml/Shell.qml+9−15
@@ -213,23 +213,9 @@ Item {
213 Connections {
213 Connections {
214 target: ApplicationManager
214 target: ApplicationManager
215
215
216− onFocusRequested: {
217− if (appId === "dialer-app" && callManager.hasCalls && greeter.locked) {
218− // If we are in the middle of a call, make dialer lockedApp and show it.
219− // This can happen if user backs out of dialer back to greeter, then
220− // launches dialer again.
221− greeter.lockedApp = appId;
222− }
223−
224− greeter.notifyAppFocused(appId);
225− }
226−
227 onFocusedApplicationIdChanged: {
216 onFocusedApplicationIdChanged: {
228− greeter.notifyAppFocused(ApplicationManager.focusedApplicationId);
217+ var appId = ApplicationManager.focusedApplicationId;
229− panel.indicators.hide();
230− }
231
218
232− onApplicationAdded: {
233 if (tutorial.running && appId != "unity8-dash") {
219 if (tutorial.running && appId != "unity8-dash") {
234 // If this happens on first boot, we may be in edge
220 // If this happens on first boot, we may be in edge
235 // tutorial or wizard while receiving a call. But a call
221 // tutorial or wizard while receiving a call. But a call
@@ -238,7 +224,15 @@ Item {
238 wizard.hide();
224 wizard.hide();
239 }
225 }
240
226
227+ if (appId === "dialer-app" && callManager.hasCalls && greeter.locked) {
228+ // If we are in the middle of a call, make dialer lockedApp and show it.
229+ // This can happen if user backs out of dialer back to greeter, then
230+ // launches dialer again.
231+ greeter.lockedApp = appId;
232+ }
241 greeter.notifyAppFocused(appId);
233 greeter.notifyAppFocused(appId);
234+
235+ panel.indicators.hide();
242 launcher.hide();
236 launcher.hide();
243 }
237 }
244 }
238 }