sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 848a6fdb21473bfaec32de4a546b79ab53843771
parent 1d3681f5213535c1f47ed8bd0cddb7df775dd75e
Author: lbonn <bonnans.l@gmail.com>
Date:   Fri, 22 May 2020 00:19:48 +0200

ipc: show marks of containers without view in tree

Diffstat:
Msway/ipc-json.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 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); }