aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-03 08:33:52 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-03 08:33:52 -0500
commit421f49fe034cc8a48348ba57af8fdf3f98adb62c (patch)
tree4fafbee0256eff1e0e9baa283ae1c8c9342e15ff /sway/ipc-server.c
parentMerge pull request #1487 from acrisci/feature/log-swaysock (diff)
downloadsway-421f49fe034cc8a48348ba57af8fdf3f98adb62c.tar.gz
sway-421f49fe034cc8a48348ba57af8fdf3f98adb62c.tar.zst
sway-421f49fe034cc8a48348ba57af8fdf3f98adb62c.zip
basic get_tree
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index f3a6469b..71f8dddd 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -343,6 +343,16 @@ void ipc_client_handle_command(struct ipc_client *client) {
343 goto exit_cleanup; 343 goto exit_cleanup;
344 } 344 }
345 345
346 case IPC_GET_TREE:
347 {
348 json_object *tree =
349 ipc_json_describe_container_recursive(&root_container);
350 const char *json_string = json_object_to_json_string(tree);
351 ipc_send_reply(client, json_string, (uint32_t) strlen(json_string));
352 json_object_put(tree);
353 goto exit_cleanup;
354 }
355
346 case IPC_GET_VERSION: 356 case IPC_GET_VERSION:
347 { 357 {
348 json_object *version = ipc_json_get_version(); 358 json_object *version = ipc_json_get_version();