@@ -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