From e892c605a23e6d88c6b778771dd2c52ec390bd65 Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Mon, 26 Sep 2022 18:59:46 +0000 Subject: [PATCH] Add sandbox_engine and sandbox_app_id to JSON view representation --- sway/ipc-json.c | 8 ++++++++ sway/sway-ipc.7.scd | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 763fb3fef..f75b96c9e 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -541,6 +541,14 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object json_object_object_add(object, "inhibit_idle", json_object_new_boolean(view_inhibit_idle(c->view))); + const char *sandbox_engine = view_get_sandbox_engine(c->view); + json_object_object_add(object, "sandbox_engine", + sandbox_engine ? json_object_new_string(sandbox_engine) : NULL); + + const char *sandbox_app_id = view_get_sandbox_app_id(c->view); + json_object_object_add(object, "sandbox_app_id", + sandbox_app_id ? json_object_new_string(sandbox_app_id) : NULL); + json_object *idle_inhibitors = json_object_new_object(); struct sway_idle_inhibitor_v1 *user_inhibitor = diff --git a/sway/sway-ipc.7.scd b/sway/sway-ipc.7.scd index c7a2c4735..81660bba7 100644 --- a/sway/sway-ipc.7.scd +++ b/sway/sway-ipc.7.scd @@ -396,6 +396,12 @@ node and will have the following properties: : (Only views) An object containing the state of the _application_ and _user_ idle inhibitors. _application_ can be _enabled_ or _none_. _user_ can be _focus_, _fullscreen_, _open_, _visible_ or _none_. +|- sandbox_engine +: string +: (Only views) The sandbox engine used by this view. +|- sandbox_app_id +: string +: (Only views) The app ID of this view, as provided by the sandbox engine. |- window : integer : (Only xwayland views) The X11 window ID for the xwayland view