diff options
author | Ian Fan <[email protected]> | 2018-07-14 11:10:36 +0100 |
---|---|---|
committer | Ian Fan <[email protected]> | 2018-08-01 16:57:15 +0100 |
commit | 317217f2c87aba4463806e211c22296ac9230b6c (patch) | |
tree | dade74c4b5a98b4f1e71e28aad771e6726b0e9a3 /sway/ipc-json.c | |
parent | dd6debf367420d0771cc0326ecb2511c1ce05ac1 (diff) |
ipc: add window::mark event
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r-- | sway/ipc-json.c | 9 |
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) { |