aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-json.c
diff options
context:
space:
mode:
authorLibravatar Thomas Hebb <tommyhebb@gmail.com>2020-04-25 15:10:22 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2020-04-27 20:37:57 -0400
commitf18bcfcd69b514e1387bf37a42be6667a4c19282 (patch)
treee073a8682121a1f225bfa2ab4059d85620a82bff /sway/ipc-json.c
parentman: add note about sway-input and sway-output pages (diff)
downloadsway-f18bcfcd69b514e1387bf37a42be6667a4c19282.tar.gz
sway-f18bcfcd69b514e1387bf37a42be6667a4c19282.tar.zst
sway-f18bcfcd69b514e1387bf37a42be6667a4c19282.zip
Add each view's shell to JSON description
This is a criteria you can use to select windows since commit 484cc189e909 ("Add shell criteria token"), but there's no way to query it for an existing window. This exposes its value in the output of `swaymsg -t get_tree`.
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r--sway/ipc-json.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 1ebc3bd2..46c52156 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -493,6 +493,8 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
493 493
494 json_object_object_add(object, "max_render_time", json_object_new_int(c->view->max_render_time)); 494 json_object_object_add(object, "max_render_time", json_object_new_int(c->view->max_render_time));
495 495
496 json_object_object_add(object, "shell", json_object_new_string(view_get_shell(c->view)));
497
496#if HAVE_XWAYLAND 498#if HAVE_XWAYLAND
497 if (c->view->type == SWAY_VIEW_XWAYLAND) { 499 if (c->view->type == SWAY_VIEW_XWAYLAND) {
498 json_object_object_add(object, "window", 500 json_object_object_add(object, "window",