Add each view's shell to JSON description

This is a criteria you can use to select windows since commit
484cc189e9 ("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`.
This commit is contained in:
Thomas Hebb 2020-04-25 15:10:22 -04:00 committed by Brian Ashworth
parent 58703e4f24
commit f18bcfcd69
2 changed files with 7 additions and 0 deletions

View file

@ -493,6 +493,8 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
json_object_object_add(object, "max_render_time", json_object_new_int(c->view->max_render_time));
json_object_object_add(object, "shell", json_object_new_string(view_get_shell(c->view)));
#if HAVE_XWAYLAND
if (c->view->type == SWAY_VIEW_XWAYLAND) {
json_object_object_add(object, "window",