mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 16:01:27 +00:00
ipc: always include old property in workspace events
This commit is contained in:
parent
d898e035ba
commit
75aba00460
|
@ -298,14 +298,12 @@ void ipc_event_workspace(struct sway_container *old,
|
||||||
wlr_log(WLR_DEBUG, "Sending workspace::%s event", change);
|
wlr_log(WLR_DEBUG, "Sending workspace::%s event", change);
|
||||||
json_object *obj = json_object_new_object();
|
json_object *obj = json_object_new_object();
|
||||||
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 (old) {
|
if (old) {
|
||||||
json_object_object_add(obj, "old",
|
json_object_object_add(obj, "old",
|
||||||
ipc_json_describe_container_recursive(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",
|
json_object_object_add(obj, "current",
|
||||||
|
|
Loading…
Reference in a new issue