mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-02-25 10:12:43 +00:00
Don't hide floating windows on visible workspaces
This commit is contained in:
parent
e9c51f30dd
commit
d04fcb372b
23
tiling.js
23
tiling.js
@ -1149,6 +1149,26 @@ class Spaces extends Map {
|
||||
this.monitors.set(monitor, toSpace);
|
||||
|
||||
let fromSpace = this.spaceOf(from);
|
||||
// Replace floating windows on visible, but not active, workspaces with
|
||||
// clones
|
||||
if (this.monitors.get(fromSpace.monitor) === fromSpace) {
|
||||
let workspace = fromSpace.workspace;
|
||||
for (let w of workspace.list_windows()) {
|
||||
if (w.is_on_all_workspaces() ||
|
||||
w.clone.get_parent() === fromSpace.cloneContainer)
|
||||
continue;
|
||||
let f = w.get_frame_rect();
|
||||
w.clone.x = f.x; w.clone.y = f.y;
|
||||
w.clone.reparent(backgroundGroup);
|
||||
w.clone.show();
|
||||
}
|
||||
}
|
||||
|
||||
let workspace = toSpace.workspace;
|
||||
for (let w of workspace.list_windows()) {
|
||||
if (w.clone.get_parent() === backgroundGroup)
|
||||
w.clone.hide();
|
||||
}
|
||||
|
||||
this.animateToSpace(toSpace, fromSpace);
|
||||
|
||||
@ -2077,8 +2097,9 @@ function showHandler(actor) {
|
||||
if (Scratch.isScratchWindow(metaWindow))
|
||||
return;
|
||||
|
||||
let space = spaces.spaceOfWindow(metaWindow);
|
||||
if (!onActive
|
||||
|| metaWindow.clone.get_parent() && metaWindow.clone.visible
|
||||
|| metaWindow.clone.get_parent() === space.cloneContainer && metaWindow.clone.visible
|
||||
// The built-in workspace-change animation is running: suppress it
|
||||
|| actor.get_parent() !== global.window_group
|
||||
) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user