From f5e44d4b2c5711862c4bffb37bc15899678c6c19 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Tue, 29 May 2018 11:21:18 -0400 Subject: Fix layout in -t get_tree --- sway/ipc-json.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 0233a36e..d2aee9a9 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -160,7 +160,8 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object json_object_object_add(object, "type", json_object_new_string("con")); if (c->parent) { - enum sway_container_layout layout = (c->parent->type == C_CONTAINER) ? + enum sway_container_layout layout = + (c->parent->type == C_CONTAINER && c->type == C_VIEW) ? c->parent->layout : c->layout; json_object_object_add(object, "layout", -- cgit v1.2.3-54-g00ecf