diff options
author | Jason Nader <jason.nader@protonmail.com> | 2020-06-13 12:32:24 +0900 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2020-06-14 00:55:14 -0400 |
commit | 45859be03f14fa0506ab8518feaec5ddb157e318 (patch) | |
tree | e838990235ecf0a4f543999ea292c0c5167957df /sway/ipc-server.c | |
parent | Remove view child surface_{map,unmap} listeners on destroy (diff) | |
download | sway-45859be03f14fa0506ab8518feaec5ddb157e318.tar.gz sway-45859be03f14fa0506ab8518feaec5ddb157e318.tar.zst sway-45859be03f14fa0506ab8518feaec5ddb157e318.zip |
i3-compat: add GET_BINDING_STATE IPC command
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r-- | sway/ipc-server.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index bd9f40bc..62bdccb8 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c | |||
@@ -876,6 +876,16 @@ void ipc_client_handle_command(struct ipc_client *client, uint32_t payload_lengt | |||
876 | goto exit_cleanup; | 876 | goto exit_cleanup; |
877 | } | 877 | } |
878 | 878 | ||
879 | case IPC_GET_BINDING_STATE: | ||
880 | { | ||
881 | json_object *current_mode = ipc_json_get_binding_mode(); | ||
882 | const char *json_string = json_object_to_json_string(current_mode); | ||
883 | ipc_send_reply(client, payload_type, json_string, | ||
884 | (uint32_t)strlen(json_string)); | ||
885 | json_object_put(current_mode); // free | ||
886 | goto exit_cleanup; | ||
887 | } | ||
888 | |||
879 | case IPC_GET_CONFIG: | 889 | case IPC_GET_CONFIG: |
880 | { | 890 | { |
881 | json_object *json = json_object_new_object(); | 891 | json_object *json = json_object_new_object(); |