Add type to returned response.

Makes `ipc_recv_response` return a struct with size, type and payload
rather than just the payload string.

This is useful if the type has to be checked on the client.
This commit is contained in:
Mikkel Oscar Lyderik 2016-01-03 20:40:50 +01:00
parent 19833fbc8b
commit 7298a9c67a
3 changed files with 39 additions and 13 deletions

View file

@ -1025,9 +1025,8 @@ void poll_for_update() {
if (FD_ISSET(ipc_event_socketfd, &readfds)) {
sway_log(L_DEBUG, "Got workspace update.");
uint32_t len;
char *buf = ipc_recv_response(ipc_event_socketfd, &len);
free(buf);
struct ipc_response *resp = ipc_recv_response(ipc_event_socketfd);
free_ipc_response(resp);
ipc_update_workspaces();
dirty = true;
}