on xenial help sign in
don't switch apps in the middle of the animation... it breaks the animation
commit2eb12a39110db9734b28613f7676deccf6c774f8 authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 3 Feb 2014, 12:43 (13 years ago) parenta8eb860
1 file changed+1−13
qml/Stages/PhoneStage.qml+1−13
qml/Stages/PhoneStage.qml+1−13
@@ -93,7 +93,6 @@ Item {
9393 function switchToApp(appId) {
9494 priv.newFocusedAppId = appId;
9595 applicationSwitchingAnimation.start();
96− grantFocusTimer.start();
9796 }
9897
9998 }
@@ -105,18 +104,6 @@ Item {
105104 onScreenshotChanged: priv.focusedScreenshot = priv.focusedApplication.screenshot
106105 }
107106
108− Timer {
109− id: grantFocusTimer
110− // Delay the actual switch to be covered by the animation for sure.
111− // 1) If we switch before starting the animation, the Mir event loop paints before the Qt event loop => flickering
112− // 2) If we do the switch after the animation, the panel wouldn't fade in early enough.
113− interval: UbuntuAnimation.SlowDuration / 4
114− repeat: false
115− onTriggered: {
116− ApplicationManager.focusApplication(priv.newFocusedAppId);
117− }
118− }
119−
120107 Timer {
121108 id: appSplashTimer
122109 // This is to show the splash screen a bit longer.
@@ -152,6 +139,7 @@ Item {
152139 }
153140
154141 // restore stuff
142+ ScriptAction { script: ApplicationManager.focusApplication(priv.newFocusedAppId); }
155143 PropertyAction { target: fadeInScreenshotImage; property: "visible"; value: false }
156144 PropertyAction { target: mainScreenshotImage; property: "visible"; value: false }
157145 }