summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-25 12:59:22 +0100
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-02-25 12:59:22 +0100
commitee32bc3aef5ae7c0b96439bc2e5cd1e32612dafd (patch)
tree7265a77aa8110634e1cfb3ed28fb2e181471c6e1 /sway
parentPrevent crash when showing scratchpad on new ws. (diff)
downloadsway-ee32bc3aef5ae7c0b96439bc2e5cd1e32612dafd.tar.gz
sway-ee32bc3aef5ae7c0b96439bc2e5cd1e32612dafd.tar.zst
sway-ee32bc3aef5ae7c0b96439bc2e5cd1e32612dafd.zip
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')
-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 @@
11#include "layout.h" 11#include "layout.h"
12#include "input_state.h" 12#include "input_state.h"
13#include "log.h" 13#include "log.h"
14#include "ipc-server.h"
14 15
15#define ASSERT_NONNULL(PTR) \ 16#define ASSERT_NONNULL(PTR) \
16 sway_assert (PTR, #PTR "must be non-null") 17 sway_assert (PTR, #PTR "must be non-null")
@@ -371,6 +372,7 @@ swayc_t *destroy_workspace(swayc_t *workspace) {
371 // destroy the WS if there are no children 372 // destroy the WS if there are no children
372 if (workspace->children->length == 0 && workspace->floating->length == 0) { 373 if (workspace->children->length == 0 && workspace->floating->length == 0) {
373 sway_log(L_DEBUG, "destroying workspace '%s'", workspace->name); 374 sway_log(L_DEBUG, "destroying workspace '%s'", workspace->name);
375 ipc_event_workspace(workspace, NULL, "empty");
374 } else { 376 } else {
375 // Move children to a different workspace on this output 377 // Move children to a different workspace on this output
376 swayc_t *new_workspace = NULL; 378 swayc_t *new_workspace = NULL;