aboutsummaryrefslogtreecommitdiff
path: root/swaymsg/main.c
diff options
context:
space:
mode:
authorFerdinand Bachmann <ferdinand.bachmann@yrlf.at>2025-02-16 18:37:25 +0100
committerSimon Ser <contact@emersion.fr>2025-02-16 19:18:29 +0100
commitc1031d84655d2658dfeb8f4b93f099adee0494be (patch)
tree924fc7a32df4593d73f22d32e23b03eda4c33170 /swaymsg/main.c
parent4852087e6166062d33372bd2869fce4033232e08 (diff)
sway/ipc-json: add ext-foreign-toplevel-handle identifier to get_tree ipc output
Fixes #8291
Diffstat (limited to 'swaymsg/main.c')
-rw-r--r--swaymsg/main.c4
1 files changed, 4 insertions, 0 deletions
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);
}