mirror of
https://github.com/NickHu/sway
synced 2024-12-27 21:58:11 +01:00
Attempt to reap old tiling parent when floating a container
This commit is contained in:
parent
32193c7e4d
commit
6a26b499a4
1 changed files with 2 additions and 1 deletions
|
@ -1030,12 +1030,13 @@ void container_set_floating(struct sway_container *container, bool enable) {
|
|||
struct sway_container *workspace = container_parent(container, C_WORKSPACE);
|
||||
|
||||
if (enable) {
|
||||
container_remove_child(container);
|
||||
struct sway_container *old_parent = container_remove_child(container);
|
||||
container_add_child(workspace->sway_workspace->floating, container);
|
||||
container_init_floating(container);
|
||||
if (container->type == C_VIEW) {
|
||||
view_set_tiled(container->sway_view, false);
|
||||
}
|
||||
container_reap_empty(old_parent);
|
||||
} else {
|
||||
// Returning to tiled
|
||||
if (container->scratchpad) {
|
||||
|
|
Loading…
Reference in a new issue