Skip to content

Commit f4af2ca

Browse files
committed
swaymsg: pretty-print sandbox properties
1 parent c4b834b commit f4af2ca

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

swaymsg/main.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ static void pretty_print_tree(json_object *obj, int indent) {
330330
const char *instance = json_object_get_string(json_object_object_get(window_props_obj, "instance"));
331331
const char *class = json_object_get_string(json_object_object_get(window_props_obj, "class"));
332332
int x11_id = json_object_get_int(json_object_object_get(obj, "window"));
333+
const char *sandbox_engine = json_object_get_string(json_object_object_get(obj, "sandbox_engine"));
334+
const char *sandbox_app_id = json_object_get_string(json_object_object_get(obj, "sandbox_app_id"));
335+
const char *sandbox_instance_id = json_object_get_string(json_object_object_get(obj, "sandbox_instance_id"));
333336

334337
printf(" (%s, pid: %d", shell, pid);
335338
if (app_id != NULL) {
@@ -344,6 +347,15 @@ static void pretty_print_tree(json_object *obj, int indent) {
344347
if (x11_id != 0) {
345348
printf(", X11 window: 0x%X", x11_id);
346349
}
350+
if (sandbox_engine != NULL) {
351+
printf(", sandbox_engine: \"%s\"", sandbox_engine);
352+
}
353+
if (sandbox_app_id != NULL) {
354+
printf(", sandbox_app_id: \"%s\"", sandbox_app_id);
355+
}
356+
if (sandbox_instance_id != NULL) {
357+
printf(", sandbox_instance_id: \"%s\"", sandbox_instance_id);
358+
}
347359
printf(")");
348360
}
349361

0 commit comments

Comments
 (0)