on xenial help sign in
don't special case for dash, clear and reset the focus stack when we minimizeAll()
f7d3606Lukáš Tinkl
qml/Stages/DesktopStage.qml+3−7
@@ -162,9 +162,6 @@ Rectangle {
162 property var focusStack: [] // focus stack of appIds
162 property var focusStack: [] // focus stack of appIds
163
163
164 function addToFocusStack(appId) {
164 function addToFocusStack(appId) {
165− if (appId === "unity8-dash")
166− return;
167−
168 var oldIndex = focusStack.indexOf(appId);
165 var oldIndex = focusStack.indexOf(appId);
169 if (oldIndex != -1) {
166 if (oldIndex != -1) {
170 // remove the old item
167 // remove the old item
@@ -175,9 +172,6 @@ Rectangle {
175 }
172 }
176
173
177 function removeAndFocusPreviousInStack(appId) {
174 function removeAndFocusPreviousInStack(appId) {
178− if (appId === "unity8-dash")
179− return;
180−
181 var removedIndex = focusStack.indexOf(appId);
175 var removedIndex = focusStack.indexOf(appId);
182 if (removedIndex != -1) {
176 if (removedIndex != -1) {
183 focusStack.splice(removedIndex, 1); // remove one item from the focus stack
177 focusStack.splice(removedIndex, 1); // remove one item from the focus stack
@@ -199,10 +193,12 @@ Rectangle {
199 focusStack.forEach(function(appId) {
193 focusStack.forEach(function(appId) {
200 var appDelegate = appRepeater.itemAt(indexOf(appId));
194 var appDelegate = appRepeater.itemAt(indexOf(appId));
201 if (appDelegate && !appDelegate.minimized) {
195 if (appDelegate && !appDelegate.minimized) {
202− // we don't want to mess with the focuStack itself or change the focus to a different window
196+ // we don't want to change the focus to a different window
203 appDelegate.minimized = true;
197 appDelegate.minimized = true;
204 }
198 }
205 });
199 });
200+ ApplicationManager.unfocusCurrentApplication(); // no app should have focus at this point
201+ focusStack = [];
206 }
202 }
207 }
203 }
208
204