diff options
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 42c1d024..4f743c40 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include "sway/input/seat.h" | 17 | #include "sway/input/seat.h" |
18 | #include "sway/ipc-server.h" | 18 | #include "sway/ipc-server.h" |
19 | #include "sway/output.h" | 19 | #include "sway/output.h" |
20 | #include "sway/scratchpad.h" | ||
20 | #include "sway/server.h" | 21 | #include "sway/server.h" |
21 | #include "sway/tree/arrange.h" | 22 | #include "sway/tree/arrange.h" |
22 | #include "sway/tree/layout.h" | 23 | #include "sway/tree/layout.h" |
@@ -328,6 +329,10 @@ static struct sway_container *container_destroy_noreaping( | |||
328 | con->destroying = true; | 329 | con->destroying = true; |
329 | container_set_dirty(con); | 330 | container_set_dirty(con); |
330 | 331 | ||
332 | if (con->scratchpad) { | ||
333 | scratchpad_remove_container(con); | ||
334 | } | ||
335 | |||
331 | if (!con->parent) { | 336 | if (!con->parent) { |
332 | return NULL; | 337 | return NULL; |
333 | } | 338 | } |
@@ -955,6 +960,9 @@ void container_set_floating(struct sway_container *container, bool enable) { | |||
955 | container_reap_empty_recursive(workspace); | 960 | container_reap_empty_recursive(workspace); |
956 | } else { | 961 | } else { |
957 | // Returning to tiled | 962 | // Returning to tiled |
963 | if (container->scratchpad) { | ||
964 | scratchpad_remove_container(container); | ||
965 | } | ||
958 | container_remove_child(container); | 966 | container_remove_child(container); |
959 | container_add_child(workspace, container); | 967 | container_add_child(workspace, container); |
960 | container->width = container->parent->width; | 968 | container->width = container->parent->width; |