mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2025-02-08 20:45:47 +01:00
workspace: reap empty parents when adding tiles
(cherry picked from commit c12169953a
)
This commit is contained in:
parent
2660c0c1bc
commit
d33f4957ce
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 *workspace_add_tiling(struct sway_workspace *workspace,
|
||||||
struct sway_container *con) {
|
struct sway_container *con) {
|
||||||
if (con->pending.workspace) {
|
if (con->pending.workspace) {
|
||||||
|
struct sway_container *old_parent = con->pending.parent;
|
||||||
container_detach(con);
|
container_detach(con);
|
||||||
|
if (old_parent) {
|
||||||
|
container_reap_empty(old_parent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (config->default_layout != L_NONE) {
|
if (config->default_layout != L_NONE) {
|
||||||
con = container_split(con, config->default_layout);
|
con = container_split(con, config->default_layout);
|
||||||
|
|
Loading…
Add table
Reference in a new issue