From 83db675e01ecc6dd49682de5b330adff478080c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 9 Feb 2019 13:14:08 +0100 Subject: [PATCH] module/i3: subscribe *before* requesting initial workspace list This ensures we don't have a race, where we might miss workspace changes between the initial list and subscribing. --- modules/i3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/i3.c b/modules/i3.c index b7ef8a7..6e7fa75 100644 --- a/modules/i3.c +++ b/modules/i3.c @@ -575,8 +575,8 @@ run(struct module *mod) } send_pkg(sock, I3_IPC_MESSAGE_TYPE_GET_VERSION, NULL); - send_pkg(sock, I3_IPC_MESSAGE_TYPE_GET_WORKSPACES, NULL); send_pkg(sock, I3_IPC_MESSAGE_TYPE_SUBSCRIBE, "[\"workspace\", \"window\"]"); + send_pkg(sock, I3_IPC_MESSAGE_TYPE_GET_WORKSPACES, NULL); /* Initial reply typically requires a couple of KB. But we often * need more later. For example, switching workspaces can result