]> git.sur5r.net Git - i3/i3/commitdiff
ipc: send workspace event in workspace_initialize (Thanks fernando)
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 29 Jun 2010 12:48:19 +0000 (14:48 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 29 Jun 2010 12:48:19 +0000 (14:48 +0200)
docs/ipc
src/workspace.c

index f65ae484ecde640244d495931e5d86f2d66a2148..5fcaf62ed721b068826d2453fd31dc3f32c1b07e 100644 (file)
--- a/docs/ipc
+++ b/docs/ipc
@@ -267,8 +267,8 @@ output::
 === workspace event
 
 This event consists of a single serialized map containing a property
-+change (string)+ which indicates the type of the change ("focus", "init",
-"empty", "urgent").
++change (string)+ which indicates the type of the change ("focus", "create",
+"init", "empty", "urgent").
 
 *Example:*
 ---------------------
index c950df8f92e27eda7e9ea56140889a6a855f10c3..2ae0a498eb76378ff90731e6a7ffb6c04b24887b 100644 (file)
@@ -59,7 +59,7 @@ Workspace *workspace_get(int number) {
 
                 TAILQ_INSERT_TAIL(workspaces, ws, workspaces);
 
-                ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"init\"}");
+                ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"create\"}");
         }
         DLOG("done\n");
 
@@ -291,6 +291,8 @@ void workspace_initialize(Workspace *ws, Output *output, bool recheck) {
                 return;
 
         workspace_assign_to(ws, ws->output, false);
+
+        ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"init\"}");
 }
 
 /*