mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
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:
parent
19833fbc8b
commit
7298a9c67a
3 changed files with 39 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue