aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-json.c
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2018-09-19 22:21:09 +0100
committerLibravatar Ian Fan <ianfan0@gmail.com>2018-09-19 22:21:09 +0100
commit81f3fda6fa9b0789c8b40582a4b85b2e9501c185 (patch)
treee31bf430e22c75dd53a857357bfbaa07f6177f1f /sway/ipc-json.c
parentswaybar: add debugging statements for handling i3bar json (diff)
downloadsway-81f3fda6fa9b0789c8b40582a4b85b2e9501c185.tar.gz
sway-81f3fda6fa9b0789c8b40582a4b85b2e9501c185.tar.zst
sway-81f3fda6fa9b0789c8b40582a4b85b2e9501c185.zip
ipc: add pid information for views in layout 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 52278be2..f054ac9f 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -221,6 +221,8 @@ static const char *describe_container_border(enum sway_container_border border)
221} 221}
222 222
223static void ipc_json_describe_view(struct sway_container *c, json_object *object) { 223static void ipc_json_describe_view(struct sway_container *c, json_object *object) {
224 json_object_object_add(object, "pid", json_object_new_int(c->view->pid));
225
224 const char *app_id = view_get_app_id(c->view); 226 const char *app_id = view_get_app_id(c->view);
225 json_object_object_add(object, "app_id", 227 json_object_object_add(object, "app_id",
226 app_id ? json_object_new_string(app_id) : NULL); 228 app_id ? json_object_new_string(app_id) : NULL);