summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-08-17 13:37:39 +0100
committerLibravatar GitHub <noreply@github.com>2018-08-17 13:37:39 +0100
commit754bbd03c0948cb91a65960a371c7e07c55818af (patch)
tree498e03974e32b23b0b19a0996d899ab8bfdd4e63 /sway
parentMerge pull request #2474 from RyanDwyer/transactionise-csd (diff)
parentAttempt to reap old tiling parent when floating a container (diff)
downloadsway-754bbd03c0948cb91a65960a371c7e07c55818af.tar.gz
sway-754bbd03c0948cb91a65960a371c7e07c55818af.tar.zst
sway-754bbd03c0948cb91a65960a371c7e07c55818af.zip
Merge pull request #2471 from RyanDwyer/reap-when-floating
Attempt to reap old tiling parent when floating a container
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/container.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index eb06edc2..db780270 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -1030,12 +1030,13 @@ void container_set_floating(struct sway_container *container, bool enable) {
1030 struct sway_container *workspace = container_parent(container, C_WORKSPACE); 1030 struct sway_container *workspace = container_parent(container, C_WORKSPACE);
1031 1031
1032 if (enable) { 1032 if (enable) {
1033 container_remove_child(container); 1033 struct sway_container *old_parent = container_remove_child(container);
1034 container_add_child(workspace->sway_workspace->floating, container); 1034 container_add_child(workspace->sway_workspace->floating, container);
1035 container_init_floating(container); 1035 container_init_floating(container);
1036 if (container->type == C_VIEW) { 1036 if (container->type == C_VIEW) {
1037 view_set_tiled(container->sway_view, false); 1037 view_set_tiled(container->sway_view, false);
1038 } 1038 }
1039 container_reap_empty(old_parent);
1039 } else { 1040 } else {
1040 // Returning to tiled 1041 // Returning to tiled
1041 if (container->scratchpad) { 1042 if (container->scratchpad) {