aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2025-07-10 16:45:16 +0200
committerFurkan Sahin <furkan-dev@proton.me>2025-07-10 16:45:16 +0200
commit3e83e54159e3a65033c8a655a76d0cca0baba993 (patch)
treecb888432dac3437b67a3a396df3fb80ecee629a1
parent70b0dcbbd44e92857bab34797cd817f4ac58943c (diff)
Add xdg_toplevel tag to IPC
-rw-r--r--sway/ipc-json.c3
-rw-r--r--sway/sway-ipc.7.scd4
2 files changed, 7 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 3933f3ef..3b69ad38 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -627,6 +627,9 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
json_object_object_add(object, "sandbox_instance_id",
sandbox_instance_id ? json_object_new_string(sandbox_instance_id) : NULL);
+ const char *tag = view_get_tag(c->view);
+ json_object_object_add(object, "tag", tag ? json_object_new_string(tag) : 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 87f0828b..4b0d5c96 100644
--- a/sway/sway-ipc.7.scd
+++ b/sway/sway-ipc.7.scd
@@ -419,6 +419,10 @@ node and will have the following properties:
: string
: (Only windows) The instance ID provided by the associated sandbox engine (or
_null_)
+|- tag
+: string
+: (Only windows) For an xdg-shell window, tag of the toplevel, if set.
+ Otherwise, _null_
|- window
: integer
: (Only xwayland windows) The X11 window ID for the xwayland window