diff options
author | emersion <contact@emersion.fr> | 2018-08-19 09:21:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 09:21:55 +0100 |
commit | 2c91afbb34f649fcd4de690be5bedba4d989a7f0 (patch) | |
tree | 681f45a530a1f8d5966161291c3cb482e52edb6e /sway/ipc-json.c | |
parent | 389d159c81502aa8b951895de11c3720bbd5ba7d (diff) | |
parent | 2b5a404ac920339a2b9ce32d4718272dee4668b9 (diff) | |
download | sway-2c91afbb34f649fcd4de690be5bedba4d989a7f0.tar.xz |
Merge pull request #2487 from RyanDwyer/workspace-floating-list
Replace hacky L_FLOATING container with a list
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r-- | sway/ipc-json.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 4c2bcc98..f40af043 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -23,8 +23,6 @@ static const char *ipc_json_layout_description(enum sway_container_layout l) { return "tabbed"; case L_STACKED: return "stacked"; - case L_FLOATING: - return "floating"; case L_NONE: break; } @@ -180,10 +178,11 @@ static void ipc_json_describe_workspace(struct sway_container *workspace, // Floating json_object *floating_array = json_object_new_array(); - struct sway_container *floating = workspace->sway_workspace->floating; - for (int i = 0; i < floating->children->length; ++i) { - struct sway_container *floater = floating->children->items[i]; - json_object_array_add(floating_array, ipc_json_describe_container_recursive(floater)); + list_t *floating = workspace->sway_workspace->floating; + for (int i = 0; i < floating->length; ++i) { + struct sway_container *floater = floating->items[i]; + json_object_array_add(floating_array, + ipc_json_describe_container_recursive(floater)); } json_object_object_add(object, "floating_nodes", floating_array); } |