mirror of
https://github.com/swaywm/sway.git
synced 2025-11-04 13:29:52 -05:00
basic get_tree
This commit is contained in:
parent
ed88b11197
commit
421f49fe03
3 changed files with 104 additions and 0 deletions
|
|
@ -343,6 +343,16 @@ void ipc_client_handle_command(struct ipc_client *client) {
|
|||
goto exit_cleanup;
|
||||
}
|
||||
|
||||
case IPC_GET_TREE:
|
||||
{
|
||||
json_object *tree =
|
||||
ipc_json_describe_container_recursive(&root_container);
|
||||
const char *json_string = json_object_to_json_string(tree);
|
||||
ipc_send_reply(client, json_string, (uint32_t) strlen(json_string));
|
||||
json_object_put(tree);
|
||||
goto exit_cleanup;
|
||||
}
|
||||
|
||||
case IPC_GET_VERSION:
|
||||
{
|
||||
json_object *version = ipc_json_get_version();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue