From 60e507ca6fc51499aeba24459f6e957b9e3f8313 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 29 Jun 2010 14:48:19 +0200 Subject: [PATCH] ipc: send workspace event in workspace_initialize (Thanks fernando) --- docs/ipc | 4 ++-- src/workspace.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/ipc b/docs/ipc index f65ae484..5fcaf62e 100644 --- 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:* --------------------- diff --git a/src/workspace.c b/src/workspace.c index c950df8f..2ae0a498 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -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\"}"); } /*