summaryrefslogtreecommitdiff
path: root/sway/ipc-json.c
diff options
context:
space:
mode:
authoremersion <[email protected]>2018-08-02 08:11:10 +0100
committerGitHub <[email protected]>2018-08-02 08:11:10 +0100
commit47bf4ed0cbf104d09bba7f39acbf2ceb84c2c694 (patch)
tree8f0085c1829ab97a920acd9d5116732779177631 /sway/ipc-json.c
parentd10ccc1eb144e4de2477398f6b11753f6b7df70b (diff)
parent9564c73c0ddca9d7b45f0476fcaee8bd878d8345 (diff)
Merge branch 'master' into fix-resize-wiggle
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) {