aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2022-09-26 18:59:46 +0000
committerFurkan Sahin <furkan-dev@proton.me>2022-09-26 18:59:46 +0000
commit69e41e97821d28e8cbbecc7446337b6dd92621b7 (patch)
tree4a2d571a765a80d269e77248bb4779e297ea0713
parentd789e3a3737a368b69e4109ddc6da5b59d7810ad (diff)
ipc-json: add sandbox properties to view JSON
-rw-r--r--sway/ipc-json.c12
-rw-r--r--sway/sway-ipc.7.scd10
2 files changed, 22 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index fc1df2ac..142512eb 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -602,6 +602,18 @@ 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);
+
+ const char *sandbox_instance_id = view_get_sandbox_instance_id(c->view);
+ json_object_object_add(object, "sandbox_instance_id",
+ sandbox_instance_id ? json_object_new_string(sandbox_instance_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 fe6bb92e..f39e3518 100644
--- a/sway/sway-ipc.7.scd
+++ b/sway/sway-ipc.7.scd
@@ -403,6 +403,16 @@ 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 associated sandbox engine (or _null_)
+|- sandbox_app_id
+: string
+: (Only views) The app ID provided by the associated sandbox engine (or _null_)
+|- sandbox_instance_id
+: string
+: (Only views) The instance ID provided by the associated sandbox engine (or
+ _null_)
|- window
: integer
: (Only xwayland views) The X11 window ID for the xwayland view