From caa3ecc235b6d7ce175a0f0136921e28e81ff61d Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Sun, 16 Feb 2025 18:37:25 +0100 Subject: sway/ipc-json: add ext-foreign-toplevel-handle identifier to get_tree ipc output Fixes #8291 --- swaymsg/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'swaymsg') diff --git a/swaymsg/main.c b/swaymsg/main.c index 0ef6eb8a..7534ea6d 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c @@ -330,6 +330,7 @@ static void pretty_print_tree(json_object *obj, int indent) { const char *instance = json_object_get_string(json_object_object_get(window_props_obj, "instance")); const char *class = json_object_get_string(json_object_object_get(window_props_obj, "class")); int x11_id = json_object_get_int(json_object_object_get(obj, "window")); + const char *foreign_toplevel_id = json_object_get_string(json_object_object_get(obj, "foreign_toplevel_identifier")); const char *sandbox_engine = json_object_get_string(json_object_object_get(obj, "sandbox_engine")); const char *sandbox_app_id = json_object_get_string(json_object_object_get(obj, "sandbox_app_id")); const char *sandbox_instance_id = json_object_get_string(json_object_object_get(obj, "sandbox_instance_id")); @@ -347,6 +348,9 @@ static void pretty_print_tree(json_object *obj, int indent) { if (x11_id != 0) { printf(", X11 window: 0x%X", x11_id); } + if (foreign_toplevel_id != NULL) { + printf(", foreign_toplevel_id: \"%s\"", foreign_toplevel_id); + } if (sandbox_engine != NULL) { printf(", sandbox_engine: \"%s\"", sandbox_engine); } -- cgit v1.2.3