@@ -93,7 +93,6 @@ Item {
93 function switchToApp(appId) {
93 function switchToApp(appId) {
94 priv.newFocusedAppId = appId;
94 priv.newFocusedAppId = appId;
95 applicationSwitchingAnimation.start();
95 applicationSwitchingAnimation.start();
96− grantFocusTimer.start();
@@ -105,18 +104,6 @@ Item {
105 onScreenshotChanged: priv.focusedScreenshot = priv.focusedApplication.screenshot
104 onScreenshotChanged: priv.focusedScreenshot = priv.focusedApplication.screenshot
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
116− ApplicationManager.focusApplication(priv.newFocusedAppId);
121 id: appSplashTimer
108 id: appSplashTimer
122 // This is to show the splash screen a bit longer.
109 // This is to show the splash screen a bit longer.
@@ -152,6 +139,7 @@ Item {
154 // restore stuff
141 // restore stuff
142+ ScriptAction { script: ApplicationManager.focusApplication(priv.newFocusedAppId); }
155 PropertyAction { target: fadeInScreenshotImage; property: "visible"; value: false }
143 PropertyAction { target: fadeInScreenshotImage; property: "visible"; value: false }
156 PropertyAction { target: mainScreenshotImage; property: "visible"; value: false }
144 PropertyAction { target: mainScreenshotImage; property: "visible"; value: false }