aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2018-07-18 11:40:16 +0100
committerIan Fan <ianfan0@gmail.com>2018-08-01 16:57:15 +0100
commit75aba004603e35c80eda397c2e987f2c3e75cbf5 (patch)
tree7f87717e596614e7a68aa8cedd73f74b4b19e4fa
parentd898e035ba539005a8d7fa8283191f4c4054612e (diff)
ipc: always include old property in workspace events
-rw-r--r--sway/ipc-server.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 8fceafa2..dc6b353b 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -298,13 +298,11 @@ void ipc_event_workspace(struct sway_container *old,
wlr_log(WLR_DEBUG, "Sending workspace::%s event", change);
json_object *obj = json_object_new_object();
json_object_object_add(obj, "change", json_object_new_string(change));
- if (strcmp("focus", change) == 0) {
- if (old) {
- json_object_object_add(obj, "old",
- ipc_json_describe_container_recursive(old));
- } else {
- json_object_object_add(obj, "old", NULL);
- }
+ if (old) {
+ json_object_object_add(obj, "old",
+ ipc_json_describe_container_recursive(old));
+ } else {
+ json_object_object_add(obj, "old", NULL);
}
if (new) {