aboutsummaryrefslogtreecommitdiff
path: root/sway/container.c
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-25 12:59:22 +0100
committerMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-25 12:59:22 +0100
commitee32bc3aef5ae7c0b96439bc2e5cd1e32612dafd (patch)
tree7265a77aa8110634e1cfb3ed28fb2e181471c6e1 /sway/container.c
parent739ba902e0b05d5e891d35c19ef4d96605473571 (diff)
Send workspace ICP event on ws destroy/empty.
There is no 'destroy' change type in the i3 IPC so this uses `empty` to notify about empty workspaces (which will be destroyed from sway right after).
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c
index 6e6b20b2..746890c9 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -11,6 +11,7 @@
#include "layout.h"
#include "input_state.h"
#include "log.h"
+#include "ipc-server.h"
#define ASSERT_NONNULL(PTR) \
sway_assert (PTR, #PTR "must be non-null")
@@ -371,6 +372,7 @@ swayc_t *destroy_workspace(swayc_t *workspace) {
// destroy the WS if there are no children
if (workspace->children->length == 0 && workspace->floating->length == 0) {
sway_log(L_DEBUG, "destroying workspace '%s'", workspace->name);
+ ipc_event_workspace(workspace, NULL, "empty");
} else {
// Move children to a different workspace on this output
swayc_t *new_workspace = NULL;