Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipc: show marks of containers without view in tree #5371

Merged
merged 1 commit into from
May 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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