on xenial help sign in
don't immediately focus a newly started app
90ce43cMichael Zanetti
qml/Shell.qml+8−8
@@ -55,14 +55,14 @@ FocusScope {
55 function activateApplication(appId) {
55 function activateApplication(appId) {
56 if (ApplicationManager.findApplication(appId)) {
56 if (ApplicationManager.findApplication(appId)) {
57 ApplicationManager.requestFocusApplication(appId);
57 ApplicationManager.requestFocusApplication(appId);
58− stages.show();
58+ stages.show(true);
59 if (stages.locked && ApplicationManager.focusedApplicationId == appId) {
59 if (stages.locked && ApplicationManager.focusedApplicationId == appId) {
60 applicationsDisplayLoader.item.select(appId);
60 applicationsDisplayLoader.item.select(appId);
61 }
61 }
62 } else {
62 } else {
63 var execFlags = shell.sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
63 var execFlags = shell.sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
64 ApplicationManager.startApplication(appId, execFlags);
64 ApplicationManager.startApplication(appId, execFlags);
65− stages.show();
65+ stages.show(false);
66 }
66 }
67 }
67 }
68
68
@@ -198,7 +198,7 @@ FocusScope {
198 onDraggingChanged: {
198 onDraggingChanged: {
199 if (!dragging) {
199 if (!dragging) {
200 if (ApplicationManager.count > 0 && progress < stages.width - units.gu(10)) {
200 if (ApplicationManager.count > 0 && progress < stages.width - units.gu(10)) {
201− stages.show()
201+ stages.show(true)
202 }
202 }
203 stagesDragHandle.progress = stages.width;
203 stagesDragHandle.progress = stages.width;
204 }
204 }
@@ -237,10 +237,10 @@ FocusScope {
237 property int overlayWidth: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.overlayWidth : false
237 property int overlayWidth: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.overlayWidth : false
238 property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
238 property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
239
239
240− function show() {
240+ function show(focusApp) {
241 shown = true;
241 shown = true;
242 panel.indicators.hide();
242 panel.indicators.hide();
243− if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0) {
243+ if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0 && focusApp) {
244 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
244 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
245 }
245 }
246 }
246 }
@@ -256,12 +256,12 @@ FocusScope {
256 target: ApplicationManager
256 target: ApplicationManager
257
257
258 onFocusRequested: {
258 onFocusRequested: {
259− stages.show();
259+ stages.show(true);
260 }
260 }
261
261
262 onFocusedApplicationIdChanged: {
262 onFocusedApplicationIdChanged: {
263 if (ApplicationManager.focusedApplicationId.length > 0) {
263 if (ApplicationManager.focusedApplicationId.length > 0) {
264− stages.show();
264+ stages.show(false);
265 } else {
265 } else {
266 if (!stages.overlayMode) {
266 if (!stages.overlayMode) {
267 stages.hide();
267 stages.hide();
@@ -276,7 +276,7 @@ FocusScope {
276 }
276 }
277
277
278 onApplicationAdded: {
278 onApplicationAdded: {
279− stages.show();
279+ stages.show(false);
280 }
280 }
281
281
282 onApplicationRemoved: {
282 onApplicationRemoved: {
qml/Stages/PhoneStage.qml+5−6
@@ -70,7 +70,8 @@ Item {
70 onFocusedApplicationIdChanged: {
70 onFocusedApplicationIdChanged: {
71 if (ApplicationManager.focusedApplicationId.length > 0) {
71 if (ApplicationManager.focusedApplicationId.length > 0) {
72 if (priv.secondApplicationStarting || priv.applicationStarting) {
72 if (priv.secondApplicationStarting || priv.applicationStarting) {
73+
73− appSplashTimer.start();
74+ appSplashTimer.restart();
74 } else {
75 } else {
75 var application = priv.focusedApplication;
76 var application = priv.focusedApplication;
76 root.fullscreen = application.fullscreen;
77 root.fullscreen = application.fullscreen;
@@ -174,11 +175,9 @@ Item {
174
175
175 Timer {
176 Timer {
176 id: appSplashTimer
177 id: appSplashTimer
177− // FIXME: apart from removing this completely in the future and make the app surface paint
178+ // FIXME: We really need to show something meaningful in the app surface instead of guessing
178− // meaningful stuff, also check for colin's stuff to land so we can shape 1.4 secs away from here
179+ // when it might be ready
179− // https://code.launchpad.net/~cjwatson/upstart-app-launch/libclick-manifest/+merge/210520
180− // https://code.launchpad.net/~cjwatson/upstart-app-launch/libclick-pkgdir/+merge/209909
181− interval: 1700
180+ interval: 500
182 repeat: false
181 repeat: false
183 onTriggered: {
182 onTriggered: {
184 priv.applicationStarting = false;
183 priv.applicationStarting = false;