mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 16:36:26 +01:00
output_evacuate: call workspace_consider_destroy
This calls `workspace_consider_destroy` on the workspace that was visible on an output that a workspace was just evacuated to. This prevents having hidden empty workspaces.
This commit is contained in:
parent
b57761e833
commit
546b976baa
1 changed files with 9 additions and 0 deletions
|
@ -189,10 +189,19 @@ static void output_evacuate(struct sway_output *output) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct sway_workspace *new_output_ws =
|
||||||
|
output_get_active_workspace(new_output);
|
||||||
|
|
||||||
workspace_output_add_priority(workspace, new_output);
|
workspace_output_add_priority(workspace, new_output);
|
||||||
output_add_workspace(new_output, workspace);
|
output_add_workspace(new_output, workspace);
|
||||||
output_sort_workspaces(new_output);
|
output_sort_workspaces(new_output);
|
||||||
ipc_event_workspace(NULL, workspace, "move");
|
ipc_event_workspace(NULL, workspace, "move");
|
||||||
|
|
||||||
|
// If there is an old workspace (the noop output may not have one),
|
||||||
|
// check to see if it is empty and should be destroyed.
|
||||||
|
if (new_output_ws) {
|
||||||
|
workspace_consider_destroy(new_output_ws);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue