diff options
author | 2022-07-26 13:20:56 +0530 | |
---|---|---|
committer | 2022-07-26 10:56:50 +0200 | |
commit | e98b97a45b38f93339c7e17c012b7f49b310e335 (patch) | |
tree | b483e0d7917dc11b36040b7b95543c5552f72c94 | |
parent | input: chase delta_discrete semantics change (diff) | |
download | sway-e98b97a45b38f93339c7e17c012b7f49b310e335.tar.gz sway-e98b97a45b38f93339c7e17c012b7f49b310e335.tar.zst sway-e98b97a45b38f93339c7e17c012b7f49b310e335.zip |
swaymsg: fix floating_nodes being ignored
Fix floating_nodes being ignored in pretty_print_tree.
-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) { |