summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/layout.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 563e9d11..d32f3dd0 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -308,7 +308,14 @@ void move_container_to(swayc_t* container, swayc_t* destination) {
308 swayc_t *parent = remove_child(container); 308 swayc_t *parent = remove_child(container);
309 // Send to new destination 309 // Send to new destination
310 if (container->is_floating) { 310 if (container->is_floating) {
311 add_floating(swayc_active_workspace_for(destination), container); 311 swayc_t *ws = swayc_active_workspace_for(destination);
312 add_floating(ws, container);
313
314 // If the workspace only has one child after adding one, it
315 // means that the workspace was just initialized.
316 if (ws->children->length + ws->floating->length == 1) {
317 ipc_event_workspace(NULL, ws, "init");
318 }
312 } else if (destination->type == C_WORKSPACE) { 319 } else if (destination->type == C_WORKSPACE) {
313 // reset container geometry 320 // reset container geometry
314 container->width = container->height = 0; 321 container->width = container->height = 0;