diff options
author | 2016-08-02 14:52:48 -0400 | |
---|---|---|
committer | 2016-08-02 14:52:48 -0400 | |
commit | 947570e6df886146d225112f3b15a1deea66c4d8 (patch) | |
tree | 2024c2407ba75bfa71bafe948a9e1f7e32435705 /sway | |
parent | Merge pull request #810 from acrisci/feature/swaymsg-pretty (diff) | |
parent | remove unmanaged nodes from get_tree (diff) | |
download | sway-947570e6df886146d225112f3b15a1deea66c4d8.tar.gz sway-947570e6df886146d225112f3b15a1deea66c4d8.tar.zst sway-947570e6df886146d225112f3b15a1deea66c4d8.zip |
Merge pull request #817 from zandrmartin/fix-unmanaged-node-json
remove unmanaged nodes from get_tree
Diffstat (limited to 'sway')
-rw-r--r-- | sway/ipc-json.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 228e551d..38aa7a8d 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -204,7 +204,7 @@ static void ipc_json_describe_view(swayc_t *c, json_object *object) { | |||
204 | c->is_floating ? "auto_on" : "auto_off")); // we can't state the cause | 204 | c->is_floating ? "auto_on" : "auto_off")); // we can't state the cause |
205 | 205 | ||
206 | json_object_object_add(object, "app_id", c->app_id ? json_object_new_string(c->app_id) : NULL); | 206 | json_object_object_add(object, "app_id", c->app_id ? json_object_new_string(c->app_id) : NULL); |
207 | // we do not include children, floating, unmanaged etc. as views have none | 207 | // we do not include children, floating etc. as views have none |
208 | } | 208 | } |
209 | 209 | ||
210 | json_object *ipc_json_describe_container(swayc_t *c) { | 210 | json_object *ipc_json_describe_container(swayc_t *c) { |
@@ -373,14 +373,6 @@ json_object *ipc_json_describe_container_recursive(swayc_t *c) { | |||
373 | } | 373 | } |
374 | } | 374 | } |
375 | json_object_object_add(object, "nodes", children); | 375 | json_object_object_add(object, "nodes", children); |
376 | |||
377 | json_object *unmanaged = json_object_new_array(); | ||
378 | if (c->unmanaged && c->unmanaged->length > 0) { | ||
379 | for (i = 0; i < c->unmanaged->length; ++i) { | ||
380 | json_object_array_add(unmanaged, ipc_json_describe_container_recursive(c->unmanaged->items[i])); | ||
381 | } | ||
382 | } | ||
383 | json_object_object_add(object, "unmanaged_nodes", unmanaged); | ||
384 | } | 376 | } |
385 | 377 | ||
386 | if (c->type == C_ROOT) { | 378 | if (c->type == C_ROOT) { |