Commit 6062284a authored by Florian Müllner's avatar Florian Müllner
Browse files

window-list: Don't consider skip-taskbar windows for app sorting

It is odd to consider windows that are not shown in the window list
for app sorting, in particular when switching between grouped and
ungrouped mode, and when a long-lived window like the DESKTOP is
parent 8f2ebafa
......@@ -57,7 +57,8 @@ function _onMenuStateChanged(menu, isOpen) {
function _getAppStableSequence(app) {
return app.get_windows().reduce(function(prev, cur) {
let windows = app.get_windows().filter(function(w) { return !w.skip_taskbar; });
return windows.reduce(function(prev, cur) {
return Math.min(prev, cur.get_stable_sequence());
}, Infinity);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment