mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-06 11:56:54 +00:00
Lookup the space using the workspace in window-removed handler
When a window is «always on visible workspace» (ie. stick() is run) `get_workspace` will return the active workspace, which is incorrect.
This commit is contained in:
@@ -368,12 +368,12 @@ add_handler = (ws, meta_window) => {
|
||||
meta_window.connect("focus", focus_wrapper)
|
||||
}
|
||||
|
||||
remove_handler = (ws, meta_window) => {
|
||||
remove_handler = (workspace, meta_window) => {
|
||||
debug("window-removed", meta_window, meta_window.title);
|
||||
// Note: If `meta_window` was closed and had focus at the time, the next
|
||||
// window has already received the `focus` signal at this point.
|
||||
|
||||
let space = spaces[meta_window.get_workspace().workspace_index]
|
||||
let space = spaces[workspace.workspace_index];
|
||||
let removed_i = space.indexOf(meta_window)
|
||||
if (removed_i < 0)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user