diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-12-29 10:43:32 -0500 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-12-29 17:07:26 +0100 |
commit | ae8937b11a7d026aaf9b79b3bc28596c1fdbd296 (patch) | |
tree | 5717da3ed29ebd93693778ffee33f12fa650a997 | |
parent | 0dbf2673a1f4c8ece52b4e161e344bf90d658b7c (diff) | |
download | sway-ae8937b11a7d026aaf9b79b3bc28596c1fdbd296.tar.xz |
Add failure reply on IPC_SYNC
Since it was decided that sway will not support IPC_SYNC, just return
`{'success': false}` as a reply
-rw-r--r-- | include/ipc.h | 1 | ||||
-rw-r--r-- | sway/ipc-server.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/ipc.h b/include/ipc.h index 9063b933..6063f69c 100644 --- a/include/ipc.h +++ b/include/ipc.h @@ -16,6 +16,7 @@ enum ipc_command_type { IPC_GET_BINDING_MODES = 8, IPC_GET_CONFIG = 9, IPC_SEND_TICK = 10, + IPC_SYNC = 11, // sway-specific command types IPC_GET_INPUTS = 100, diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 69009f25..28546d41 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c @@ -836,6 +836,14 @@ void ipc_client_handle_command(struct ipc_client *client) { goto exit_cleanup; } + case IPC_SYNC: + { + // It was decided sway will not support this, just return success:false + const char msg[] = "{\"success\": false}"; + ipc_send_reply(client, msg, strlen(msg)); + goto exit_cleanup; + } + default: wlr_log(WLR_INFO, "Unknown IPC command type %i", client->current_command); goto exit_cleanup; |