forked from Blendman974/faceclaw
fix: hide switcher move action for temporary windows
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -1996,7 +1996,8 @@ class Shell {
|
|||||||
},
|
},
|
||||||
}]),
|
}]),
|
||||||
);
|
);
|
||||||
if (foreground.closeable && this.switcherWindows().filter(window => window.closeable).length > 1) {
|
const movableWindows = this.switcherWindows().filter(window => window.closeable);
|
||||||
|
if (movableWindows.length > 1 && movableWindows.includes(foreground)) {
|
||||||
items.push({
|
items.push({
|
||||||
label: "Move in app switcher",
|
label: "Move in app switcher",
|
||||||
description: "Choose this open window's position in the app switcher.",
|
description: "Choose this open window's position in the app switcher.",
|
||||||
|
|||||||
@@ -118,6 +118,9 @@ test('temporary status windows and pinned slots stay fixed, including selected s
|
|||||||
assert.deepEqual(h.ids(), ['launcher', 'terminal:two', 'notifications:temporary', 'another-pinned', 'calendar', 'terminal:one']);
|
assert.deepEqual(h.ids(), ['launcher', 'terminal:two', 'notifications:temporary', 'another-pinned', 'calendar', 'terminal:one']);
|
||||||
assert.equal(h.s.foregroundWindow(), hidden);
|
assert.equal(h.s.foregroundWindow(), hidden);
|
||||||
assert.equal(h.s.selectedStatus.host, hidden);
|
assert.equal(h.s.selectedStatus.host, hidden);
|
||||||
|
h.s.openEscapeMenu();
|
||||||
|
assert.ok(!h.menu().items.some(item => item.label === 'Move in app switcher'));
|
||||||
|
h.s.stack.pop();
|
||||||
h.s.openSwitcherMoveMenu(h.first.windowId);
|
h.s.openSwitcherMoveMenu(h.first.windowId);
|
||||||
assert.deepEqual(Array.from(h.menu().items, item => item.label), ['1. Terminal', '2. Calendar', '3. Terminal']);
|
assert.deepEqual(Array.from(h.menu().items, item => item.label), ['1. Terminal', '2. Calendar', '3. Terminal']);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user