mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 08:21:28 +00:00
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).
This commit is contained in:
parent
739ba902e0
commit
ee32bc3aef
|
@ -11,6 +11,7 @@
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
#include "input_state.h"
|
#include "input_state.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "ipc-server.h"
|
||||||
|
|
||||||
#define ASSERT_NONNULL(PTR) \
|
#define ASSERT_NONNULL(PTR) \
|
||||||
sway_assert (PTR, #PTR "must be non-null")
|
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
|
// destroy the WS if there are no children
|
||||||
if (workspace->children->length == 0 && workspace->floating->length == 0) {
|
if (workspace->children->length == 0 && workspace->floating->length == 0) {
|
||||||
sway_log(L_DEBUG, "destroying workspace '%s'", workspace->name);
|
sway_log(L_DEBUG, "destroying workspace '%s'", workspace->name);
|
||||||
|
ipc_event_workspace(workspace, NULL, "empty");
|
||||||
} else {
|
} else {
|
||||||
// Move children to a different workspace on this output
|
// Move children to a different workspace on this output
|
||||||
swayc_t *new_workspace = NULL;
|
swayc_t *new_workspace = NULL;
|
||||||
|
|
Loading…
Reference in a new issue