diff options
-rw-r--r-- | sway/ipc-json.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 46c52156..67f0eed7 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -471,14 +471,6 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object | |||
471 | bool visible = view_is_visible(c->view); | 471 | bool visible = view_is_visible(c->view); |
472 | json_object_object_add(object, "visible", json_object_new_boolean(visible)); | 472 | json_object_object_add(object, "visible", json_object_new_boolean(visible)); |
473 | 473 | ||
474 | json_object *marks = json_object_new_array(); | ||
475 | list_t *con_marks = c->marks; | ||
476 | for (int i = 0; i < con_marks->length; ++i) { | ||
477 | json_object_array_add(marks, json_object_new_string(con_marks->items[i])); | ||
478 | } | ||
479 | |||
480 | json_object_object_add(object, "marks", marks); | ||
481 | |||
482 | struct wlr_box window_box = { | 474 | struct wlr_box window_box = { |
483 | c->content_x - c->x, | 475 | c->content_x - c->x, |
484 | (c->current.border == B_PIXEL) ? c->current.border_thickness : 0, | 476 | (c->current.border == B_PIXEL) ? c->current.border_thickness : 0, |
@@ -582,6 +574,14 @@ static void ipc_json_describe_container(struct sway_container *c, json_object *o | |||
582 | get_deco_rect(c, &deco_box); | 574 | get_deco_rect(c, &deco_box); |
583 | json_object_object_add(object, "deco_rect", ipc_json_create_rect(&deco_box)); | 575 | json_object_object_add(object, "deco_rect", ipc_json_create_rect(&deco_box)); |
584 | 576 | ||
577 | json_object *marks = json_object_new_array(); | ||
578 | list_t *con_marks = c->marks; | ||
579 | for (int i = 0; i < con_marks->length; ++i) { | ||
580 | json_object_array_add(marks, json_object_new_string(con_marks->items[i])); | ||
581 | } | ||
582 | |||
583 | json_object_object_add(object, "marks", marks); | ||
584 | |||
585 | if (c->view) { | 585 | if (c->view) { |
586 | ipc_json_describe_view(c, object); | 586 | ipc_json_describe_view(c, object); |
587 | } | 587 | } |