on xenial help sign in
always focus the first app in the stack, based on recency
commitbbce29349c51b2c962ffe5010a863ac2a703a2d3 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 21 Oct 2015, 00:26 (11 years ago) parentf99bdcf
1 file changed+2−5
qml/Stages/DesktopStage.qml+2−5
qml/Stages/DesktopStage.qml+2−5
@@ -167,7 +167,7 @@ Rectangle {
167167 // remove the old item
168168 focusStack.splice(oldIndex, 1);
169169 }
170− // append to the top of the focus stack
170+ // insert to the top of the focus stack
171171 focusStack.unshift(appId);
172172 }
173173
@@ -175,10 +175,7 @@ Rectangle {
175175 var removedIndex = focusStack.indexOf(appId);
176176 if (removedIndex != -1) {
177177 focusStack.splice(removedIndex, 1); // remove one item from the focus stack
178− if (removedIndex > 1)
179− ApplicationManager.focusApplication(focusStack[removedIndex-1]); // focus the previous one
180− else
181− focusFirstInStack(); // focus the next/first one
178+ focusFirstInStack(); // focus the first one
182179 }
183180 }
184181