]> git.sur5r.net Git - i3/i3/blobdiff - src/workspace.c
Added new IPC library(i3-ipc++) in documents.
[i3/i3] / src / workspace.c
index 2af88d73de1f915d67717c530a9331393c1e3274..5c2c48fad65506b7952f7295a2f868f0e0b291f0 100644 (file)
@@ -289,6 +289,7 @@ Con *create_workspace_on_output(Output *output, Con *content) {
     ws->workspace_layout = config.default_layout;
     _workspace_apply_default_orientation(ws);
 
+    ipc_send_workspace_event("init", ws, NULL);
     return ws;
 }
 
@@ -1004,13 +1005,11 @@ bool workspace_move_to_output(Con *ws, Output *output) {
             break;
         }
 
-        /* if we couldn't create the workspace using an assignment, create
-         * it on the output */
+        /* if we couldn't create the workspace using an assignment, create it on
+         * the output. Workspace init IPC events are sent either by
+         * workspace_get or create_workspace_on_output. */
         if (!used_assignment)
             create_workspace_on_output(current_output, ws->parent);
-
-        /* notify the IPC listeners */
-        ipc_send_workspace_event("init", ws, NULL);
     }
     DLOG("Detaching\n");