mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 23:47:21 +01:00
workspace: reap empty parents when adding tiles
This commit is contained in:
parent
fd36289faa
commit
c12169953a
1 changed files with 4 additions and 0 deletions
|
@ -794,7 +794,11 @@ void workspace_detach(struct sway_workspace *workspace) {
|
|||
struct sway_container *workspace_add_tiling(struct sway_workspace *workspace,
|
||||
struct sway_container *con) {
|
||||
if (con->pending.workspace) {
|
||||
struct sway_container *old_parent = con->pending.parent;
|
||||
container_detach(con);
|
||||
if (old_parent) {
|
||||
container_reap_empty(old_parent);
|
||||
}
|
||||
}
|
||||
if (config->default_layout != L_NONE) {
|
||||
con = container_split(con, config->default_layout);
|
||||
|
|
Loading…
Reference in a new issue