aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlbonn <bonnans.l@gmail.com>2020-05-22 00:19:48 +0200
committerSimon Ser <contact@emersion.fr>2020-05-22 08:21:22 +0200
commit848a6fdb21473bfaec32de4a546b79ab53843771 (patch)
tree10c89d5fef56d9b973abade81a5623ac677c2566
parent1d3681f5213535c1f47ed8bd0cddb7df775dd75e (diff)
ipc: show marks of containers without view in tree
-rw-r--r--sway/ipc-json.c16
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
bool visible = view_is_visible(c->view);
json_object_object_add(object, "visible", json_object_new_boolean(visible));
- json_object *marks = json_object_new_array();
- list_t *con_marks = c->marks;
- for (int i = 0; i < con_marks->length; ++i) {
- json_object_array_add(marks, json_object_new_string(con_marks->items[i]));
- }
-
- json_object_object_add(object, "marks", marks);
-
struct wlr_box window_box = {
c->content_x - c->x,
(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
get_deco_rect(c, &deco_box);
json_object_object_add(object, "deco_rect", ipc_json_create_rect(&deco_box));
+ json_object *marks = json_object_new_array();
+ list_t *con_marks = c->marks;
+ for (int i = 0; i < con_marks->length; ++i) {
+ json_object_array_add(marks, json_object_new_string(con_marks->items[i]));
+ }
+
+ json_object_object_add(object, "marks", marks);
+
if (c->view) {
ipc_json_describe_view(c, object);
}