mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-07-01 14:40:02 +00:00
insertWindow: Handle stuck windows minimally
When spawning windows on a secondary monitor, and there's workspaces-only-on-primary, we simply want to connect the necessary signals and make sure the window is shown.
This commit is contained in:
13
tiling.js
13
tiling.js
@@ -2069,8 +2069,8 @@ function insertWindow(metaWindow, {existing}) {
|
||||
|
||||
let actor = metaWindow.get_compositor_private();
|
||||
|
||||
let connectSizeChanged = (tiled) => {
|
||||
if (tiled)
|
||||
let connectSizeChanged = (show) => {
|
||||
if (show)
|
||||
animateWindow(metaWindow);
|
||||
actor.opacity = 255;
|
||||
metaWindow.unmapped && signals.connect(metaWindow, 'size-changed', resizeHandler);
|
||||
@@ -2114,8 +2114,13 @@ function insertWindow(metaWindow, {existing}) {
|
||||
}
|
||||
}
|
||||
|
||||
if (Scratch.isScratchWindow(metaWindow) && !metaWindow.is_on_all_workspaces()) {
|
||||
// Moving from secondary monitor to primary can strip `is_on_all_workspaces`.
|
||||
if (metaWindow.is_on_all_workspaces()) {
|
||||
// Only connect the necessary signals and show windows on shared
|
||||
// secondary monitors.
|
||||
connectSizeChanged(true);
|
||||
return;
|
||||
} else if (Scratch.isScratchWindow(metaWindow)){
|
||||
// And make sure scratch windows are stuck
|
||||
Scratch.makeScratch(metaWindow);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user