mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
i3-compat: add GET_BINDING_STATE IPC command
This commit is contained in:
parent
f9361ae36c
commit
45859be03f
10 changed files with 48 additions and 0 deletions
|
|
@ -876,6 +876,16 @@ void ipc_client_handle_command(struct ipc_client *client, uint32_t payload_lengt
|
|||
goto exit_cleanup;
|
||||
}
|
||||
|
||||
case IPC_GET_BINDING_STATE:
|
||||
{
|
||||
json_object *current_mode = ipc_json_get_binding_mode();
|
||||
const char *json_string = json_object_to_json_string(current_mode);
|
||||
ipc_send_reply(client, payload_type, json_string,
|
||||
(uint32_t)strlen(json_string));
|
||||
json_object_put(current_mode); // free
|
||||
goto exit_cleanup;
|
||||
}
|
||||
|
||||
case IPC_GET_CONFIG:
|
||||
{
|
||||
json_object *json = json_object_new_object();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue