diff --git a/include/i3/ipc.h b/include/i3/ipc.h index 131c4b16..19d93298 100644 --- a/include/i3/ipc.h +++ b/include/i3/ipc.h @@ -34,6 +34,9 @@ * */ +/** Command reply type */ +#define I3_IPC_REPLY_TYPE_COMMAND 0 + /** Workspaces reply type */ #define I3_IPC_REPLY_TYPE_WORKSPACES 1 diff --git a/src/ipc.c b/src/ipc.c index 629ec89d..8bae4f07 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -181,6 +181,12 @@ static void ipc_handle_message(int fd, uint8_t *message, int size, parse_command(global_conn, (const char*)command); free(command); + /* For now, every command gets a positive acknowledge + * (will change with the new command parser) */ + const char *reply = "{\"success\":true}"; + ipc_send_message(fd, (const unsigned char*)reply, + I3_IPC_REPLY_TYPE_COMMAND, strlen(reply)); + break; } case I3_IPC_MESSAGE_TYPE_GET_WORKSPACES: