diff options
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/layout.c b/sway/layout.c index a9e7c7f1..563e9d11 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include "workspace.h" | 10 | #include "workspace.h" |
11 | #include "focus.h" | 11 | #include "focus.h" |
12 | #include "output.h" | 12 | #include "output.h" |
13 | #include "ipc-server.h" | ||
13 | 14 | ||
14 | swayc_t root_container; | 15 | swayc_t root_container; |
15 | list_t *scratchpad; | 16 | list_t *scratchpad; |
@@ -312,6 +313,12 @@ void move_container_to(swayc_t* container, swayc_t* destination) { | |||
312 | // reset container geometry | 313 | // reset container geometry |
313 | container->width = container->height = 0; | 314 | container->width = container->height = 0; |
314 | add_child(destination, container); | 315 | add_child(destination, container); |
316 | |||
317 | // If the workspace only has one child after adding one, it | ||
318 | // means that the workspace was just initialized. | ||
319 | if (destination->children->length + destination->floating->length == 1) { | ||
320 | ipc_event_workspace(NULL, destination, "init"); | ||
321 | } | ||
315 | } else { | 322 | } else { |
316 | // reset container geometry | 323 | // reset container geometry |
317 | container->width = container->height = 0; | 324 | container->width = container->height = 0; |