on xenial help sign in
Consolidate app-switching logic
commitca39b8b4414346789b8aee14f52fc879b1130fe7 authorMichael Terry <michael.terry@canonical.com> dateThu 12 Feb 2015, 08:41 (12 years ago) parent6038c08
1 file changed+9−15
qml/Shell.qml+9−15
qml/Shell.qml+9−15
@@ -213,23 +213,9 @@ Item {
213213 Connections {
214214 target: ApplicationManager
215215
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−
227216 onFocusedApplicationIdChanged: {
228− greeter.notifyAppFocused(ApplicationManager.focusedApplicationId);
229− panel.indicators.hide();
230− }
217+ var appId = ApplicationManager.focusedApplicationId;
231218
232− onApplicationAdded: {
233219 if (tutorial.running && appId != "unity8-dash") {
234220 // If this happens on first boot, we may be in edge
235221 // tutorial or wizard while receiving a call. But a call
@@ -238,7 +224,15 @@ Item {
238224 wizard.hide();
239225 }
240226
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+ }
241233 greeter.notifyAppFocused(appId);
234+
235+ panel.indicators.hide();
242236 launcher.hide();
243237 }
244238 }