@@ -58,10 +58,6 @@ AbstractStage {
58 spread.cancel();
58 spread.cancel();
62− onRowsInserted: priv.updateForegroundMaximizedApp()
63− onRowsRemoved: priv.updateForegroundMaximizedApp()
64− onRowsMoved: priv.updateForegroundMaximizedApp()
67 GlobalShortcut {
63 GlobalShortcut {
@@ -120,6 +116,8 @@ AbstractStage {
120 var index = indexOf(focusedAppId);
116 var index = indexOf(focusedAppId);
121 return index >= 0 && index < appRepeater.count ? appRepeater.itemAt(index) : null
117 return index >= 0 && index < appRepeater.count ? appRepeater.itemAt(index) : null
119+ onFocusedAppDelegateChanged: updateForegroundMaximizedApp();
123 property int foregroundMaximizedAppIdIndex: -1
121 property int foregroundMaximizedAppIdIndex: -1
125 function updateForegroundMaximizedApp() {
123 function updateForegroundMaximizedApp() {
@@ -177,6 +175,7 @@ AbstractStage {
177 onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize();
175 onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize();
178 onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel
176 onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel
179 && priv.focusedAppDelegate.restore();
177 && priv.focusedAppDelegate.restore();
178+ onFocusMaximizedApp: ApplicationManager.focusApplication(appRepeater.itemAt(priv.foregroundMaximizedAppIdIndex).appId)
182 Binding {
181 Binding {