summaryrefslogtreecommitdiff
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
authorBrian Ashworth <[email protected]>2018-05-12 12:43:34 -0400
committerGitHub <[email protected]>2018-05-12 12:43:34 -0400
commitec60e24f75f778b378206366057df4efae4b8630 (patch)
treea2b6ce2f6f28b294ae6cbb8cbf49b107138215f5 /sway/ipc-server.c
parente3625d8f337d61c5d2ba1266679b9053168cd0ae (diff)
parentb1c33ecc256c58c7ecee28e2f4507dd374727d62 (diff)
Merge branch 'master' into edge-borders
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 39d1d0a7..8734e8f8 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -546,6 +546,19 @@ void ipc_client_handle_command(struct ipc_client *client) {
goto exit_cleanup;
}
+ case IPC_GET_SEATS:
+ {
+ json_object *seats = json_object_new_array();
+ struct sway_seat *seat = NULL;
+ wl_list_for_each(seat, &input_manager->seats, link) {
+ json_object_array_add(seats, ipc_json_describe_seat(seat));
+ }
+ const char *json_string = json_object_to_json_string(seats);
+ ipc_send_reply(client, json_string, (uint32_t)strlen(json_string));
+ json_object_put(seats); // free
+ goto exit_cleanup;
+ }
+
case IPC_GET_TREE:
{
json_object *tree =