@@ -65,6 +65,11 @@ Rectangle {
66 ApplicationManager.requestFocusApplication(appId)
66 ApplicationManager.requestFocusApplication(appId)
68+ onApplicationRemoved: {
69+ if (priv.foregroundMaximizedAppId === appId) {
70+ priv.foregroundMaximizedAppId = "";
69 onFocusRequested: {
74 onFocusRequested: {
70 var appIndex = priv.indexOf(appId);
75 var appIndex = priv.indexOf(appId);
@@ -86,6 +91,7 @@ Rectangle {
86 var index = indexOf(focusedAppId);
91 var index = indexOf(focusedAppId);
87 return index >= 0 && index < appRepeater.count ? appRepeater.itemAt(index) : null
92 return index >= 0 && index < appRepeater.count ? appRepeater.itemAt(index) : null
94+ property string foregroundMaximizedAppId: ""
90 function indexOf(appId) {
96 function indexOf(appId) {
91 for (var i = 0; i < ApplicationManager.count; i++) {
97 for (var i = 0; i < ApplicationManager.count; i++) {
@@ -150,6 +156,18 @@ Rectangle {
159+ readonly property bool foregroundMaximized: maximized && index == 0
160+ onForegroundMaximizedChanged: {
161+ if (foregroundMaximized) {
162+ priv.foregroundMaximizedAppId = model.appId;
163+ } else if (priv.foregroundMaximizedAppId === model.appId) {
164+ priv.foregroundMaximizedAppId = "";
168+ visible: !minimized &&
169+ (priv.foregroundMaximizedAppId === "" || priv.foregroundMaximizedAppId === model.appId)
153 Binding {
171 Binding {
154 target: ApplicationManager.get(index)
172 target: ApplicationManager.get(index)
155 property: "requestedState"
173 property: "requestedState"