summaryrefslogtreecommitdiffstats
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 26d0be65..9122d548 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -792,11 +792,7 @@ void ipc_event_window(swayc_t *window, const char *change) {
792 sway_log(L_DEBUG, "Sending window::%s event", change); 792 sway_log(L_DEBUG, "Sending window::%s event", change);
793 json_object *obj = json_object_new_object(); 793 json_object *obj = json_object_new_object();
794 json_object_object_add(obj, "change", json_object_new_string(change)); 794 json_object_object_add(obj, "change", json_object_new_string(change));
795 if (strcmp(change, "close") == 0 || !window) { 795 json_object_object_add(obj, "container", ipc_json_describe_container_recursive(window));
796 json_object_object_add(obj, "container", NULL);
797 } else {
798 json_object_object_add(obj, "container", ipc_json_describe_container(window));
799 }
800 796
801 const char *json_string = json_object_to_json_string(obj); 797 const char *json_string = json_object_to_json_string(obj);
802 ipc_send_event(json_string, IPC_EVENT_WINDOW); 798 ipc_send_event(json_string, IPC_EVENT_WINDOW);