diff options
-rw-r--r-- | swaymsg/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index 02bb12c6..c08406e2 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -331,6 +331,15 @@ static void pretty_print_tree(json_object *obj, int indent) { | |||
331 | for (size_t i = 0; i < len; i++) { | 331 | for (size_t i = 0; i < len; i++) { |
332 | pretty_print_tree(json_object_array_get_idx(nodes_obj, i), indent + 1); | 332 | pretty_print_tree(json_object_array_get_idx(nodes_obj, i), indent + 1); |
333 | } | 333 | } |
334 | |||
335 | json_object *floating_nodes_obj; | ||
336 | json_bool floating_nodes = json_object_object_get_ex(obj, "floating_nodes", &floating_nodes_obj); | ||
337 | if (floating_nodes) { | ||
338 | size_t len = json_object_array_length(floating_nodes_obj); | ||
339 | for (size_t i = 0; i < len; i++) { | ||
340 | pretty_print_tree(json_object_array_get_idx(floating_nodes_obj, i), indent + 1); | ||
341 | } | ||
342 | } | ||
334 | } | 343 | } |
335 | 344 | ||
336 | static void pretty_print(int type, json_object *resp) { | 345 | static void pretty_print(int type, json_object *resp) { |