on xenial help sign in
don't immediately focus a newly started app
commit90ce43c13602a8ccf53bb5454d4f33d7ac0cd969 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 1 Apr 2014, 20:35 (13 years ago) parented6d0d8
2 files changed+13−14
qml/Shell.qml+8−8 qml/Stages/PhoneStage.qml+5−6
qml/Shell.qml+8−8
@@ -55,14 +55,14 @@ FocusScope {
5555 function activateApplication(appId) {
5656 if (ApplicationManager.findApplication(appId)) {
5757 ApplicationManager.requestFocusApplication(appId);
58− stages.show();
58+ stages.show(true);
5959 if (stages.locked && ApplicationManager.focusedApplicationId == appId) {
6060 applicationsDisplayLoader.item.select(appId);
6161 }
6262 } else {
6363 var execFlags = shell.sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
6464 ApplicationManager.startApplication(appId, execFlags);
65− stages.show();
65+ stages.show(false);
6666 }
6767 }
6868
@@ -198,7 +198,7 @@ FocusScope {
198198 onDraggingChanged: {
199199 if (!dragging) {
200200 if (ApplicationManager.count > 0 && progress < stages.width - units.gu(10)) {
201− stages.show()
201+ stages.show(true)
202202 }
203203 stagesDragHandle.progress = stages.width;
204204 }
@@ -237,10 +237,10 @@ FocusScope {
237237 property int overlayWidth: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.overlayWidth : false
238238 property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
239239
240− function show() {
240+ function show(focusApp) {
241241 shown = true;
242242 panel.indicators.hide();
243− if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0) {
243+ if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0 && focusApp) {
244244 ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
245245 }
246246 }
@@ -256,12 +256,12 @@ FocusScope {
256256 target: ApplicationManager
257257
258258 onFocusRequested: {
259− stages.show();
259+ stages.show(true);
260260 }
261261
262262 onFocusedApplicationIdChanged: {
263263 if (ApplicationManager.focusedApplicationId.length > 0) {
264− stages.show();
264+ stages.show(false);
265265 } else {
266266 if (!stages.overlayMode) {
267267 stages.hide();
@@ -276,7 +276,7 @@ FocusScope {
276276 }
277277
278278 onApplicationAdded: {
279− stages.show();
279+ stages.show(false);
280280 }
281281
282282 onApplicationRemoved: {
qml/Stages/PhoneStage.qml+5−6
@@ -70,7 +70,8 @@ Item {
7070 onFocusedApplicationIdChanged: {
7171 if (ApplicationManager.focusedApplicationId.length > 0) {
7272 if (priv.secondApplicationStarting || priv.applicationStarting) {
73− appSplashTimer.start();
73+
74+ appSplashTimer.restart();
7475 } else {
7576 var application = priv.focusedApplication;
7677 root.fullscreen = application.fullscreen;
@@ -174,11 +175,9 @@ Item {
174175
175176 Timer {
176177 id: appSplashTimer
177− // FIXME: apart from removing this completely in the future and make the app surface paint
178− // meaningful stuff, also check for colin's stuff to land so we can shape 1.4 secs away from here
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
178+ // FIXME: We really need to show something meaningful in the app surface instead of guessing
179+ // when it might be ready
180+ interval: 500
182181 repeat: false
183182 onTriggered: {
184183 priv.applicationStarting = false;