mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-04 11:36:54 +00:00
Run scratch layer heuristic for all windows on startup
Since `add_filter` will filter out «stuck» windows the heuristic wasn't run on any possible scratch windows (since most floating scratch windows are «stuck»).
This commit is contained in:
@@ -825,13 +825,12 @@ function add_all_from_workspace(workspace) {
|
||||
let space = spaces.spaceOf(workspace);
|
||||
windows.forEach((meta_window, i) => {
|
||||
meta_window[focus_signal] = meta_window.connect("focus", focus_wrapper);
|
||||
if (meta_window.above || meta_window.minimized) {
|
||||
// Rough heuristic to figure out if a window should float
|
||||
Scratch.makeScratch(meta_window);
|
||||
return;
|
||||
}
|
||||
if(space.indexOf(meta_window) < 0 && add_filter(meta_window, true)) {
|
||||
if (meta_window.above || meta_window.minimized) {
|
||||
// Rough heuristic to figure out if a window should float
|
||||
Scratch.makeScratch(meta_window);
|
||||
return;
|
||||
}
|
||||
|
||||
// Using add_handler is unreliable since it interacts with focus.
|
||||
space.push(meta_window);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user