Skip to content

Commit

Permalink
ipc: show marks of containers without view in tree
Browse files Browse the repository at this point in the history
  • Loading branch information
lbonn authored and emersion committed May 22, 2020
1 parent 1d3681f commit 848a6fd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sway/ipc-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 848a6fd

Please sign in to comment.