mirror of
https://github.com/swaywm/sway.git
synced 2024-12-03 11:56:53 +00:00
ipc: recursive workspace containers in event
Recursively describe workspace containers in the workspace event. This is for compatability with i3 and i3ipc libraries.
This commit is contained in:
parent
61befb49f7
commit
e1e15bb43e
|
@ -543,14 +543,14 @@ void ipc_event_workspace(swayc_t *old, swayc_t *new, const char *change) {
|
||||||
json_object_object_add(obj, "change", json_object_new_string(change));
|
json_object_object_add(obj, "change", json_object_new_string(change));
|
||||||
if (strcmp("focus", change) == 0) {
|
if (strcmp("focus", change) == 0) {
|
||||||
if (old) {
|
if (old) {
|
||||||
json_object_object_add(obj, "old", ipc_json_describe_container(old));
|
json_object_object_add(obj, "old", ipc_json_describe_container_recursive(old));
|
||||||
} else {
|
} else {
|
||||||
json_object_object_add(obj, "old", NULL);
|
json_object_object_add(obj, "old", NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new) {
|
if (new) {
|
||||||
json_object_object_add(obj, "current", ipc_json_describe_container(new));
|
json_object_object_add(obj, "current", ipc_json_describe_container_recursive(new));
|
||||||
} else {
|
} else {
|
||||||
json_object_object_add(obj, "current", NULL);
|
json_object_object_add(obj, "current", NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue