@@ -58,10 +58,6 @@ AbstractStage {
5858 spread.cancel();
5959 }
6060 }
61−
62− onRowsInserted: priv.updateForegroundMaximizedApp()
63− onRowsRemoved: priv.updateForegroundMaximizedApp()
64− onRowsMoved: priv.updateForegroundMaximizedApp()
6561 }
6662
6763 GlobalShortcut {
@@ -120,6 +116,8 @@ AbstractStage {
120116 var index = indexOf(focusedAppId);
121117 return index >= 0 && index < appRepeater.count ? appRepeater.itemAt(index) : null
122118 }
119+ onFocusedAppDelegateChanged: updateForegroundMaximizedApp();
120+
123121 property int foregroundMaximizedAppIdIndex: -1
124122
125123 function updateForegroundMaximizedApp() {
@@ -177,6 +175,7 @@ AbstractStage {
177175 onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize();
178176 onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel
179177 && priv.focusedAppDelegate.restore();
178+ onFocusMaximizedApp: ApplicationManager.focusApplication(appRepeater.itemAt(priv.foregroundMaximizedAppIdIndex).appId)
180179 }
181180
182181 Binding {