summaryrefslogtreecommitdiff
path: root/sway/ipc-json.c
diff options
context:
space:
mode:
authorRyan Dwyer <[email protected]>2018-08-02 08:17:25 +1000
committerGitHub <[email protected]>2018-08-02 08:17:25 +1000
commit4cc0855f21a2704314aa7b8973ceae7a8b463a1a (patch)
tree92d5b04c01c2da2bce20819ade8ed834bf2e420c /sway/ipc-json.c
parentf078f7fdfa8c1b2549178b8137c6731c2fff6d3f (diff)
parent46cfa8ff56acff0139b2e24300cbc3ea19da723f (diff)
Merge pull request #2264 from ianyfan/ipc
IPC Events (1.0)
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r--sway/ipc-json.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index c49ea47e..4c2bcc98 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -201,6 +201,15 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
bool urgent = c->type == C_VIEW ?
view_is_urgent(c->sway_view) : container_has_urgent_child(c);
json_object_object_add(object, "urgent", json_object_new_boolean(urgent));
+
+ if (c->type == C_VIEW) {
+ json_object *marks = json_object_new_array();
+ list_t *view_marks = c->sway_view->marks;
+ for (int i = 0; i < view_marks->length; ++i) {
+ json_object_array_add(marks, json_object_new_string(view_marks->items[i]));
+ }
+ json_object_object_add(object, "marks", marks);
+ }
}
static void focus_inactive_children_iterator(struct sway_container *c, void *data) {