diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-03 20:40:50 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-03 20:40:50 +0100 |
commit | 7298a9c67aed2d7a5c5c1df55bfa6052cac04d51 (patch) | |
tree | af92196751fdc7cc326b8e6a32c1c62983fd30bb /swaybar | |
parent | Add IPC event types (diff) | |
download | sway-7298a9c67aed2d7a5c5c1df55bfa6052cac04d51.tar.gz sway-7298a9c67aed2d7a5c5c1df55bfa6052cac04d51.tar.zst sway-7298a9c67aed2d7a5c5c1df55bfa6052cac04d51.zip |
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.
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/swaybar/main.c b/swaybar/main.c index aa761b7d..d534345a 100644 --- a/swaybar/main.c +++ b/swaybar/main.c | |||
@@ -1025,9 +1025,8 @@ void poll_for_update() { | |||
1025 | 1025 | ||
1026 | if (FD_ISSET(ipc_event_socketfd, &readfds)) { | 1026 | if (FD_ISSET(ipc_event_socketfd, &readfds)) { |
1027 | sway_log(L_DEBUG, "Got workspace update."); | 1027 | sway_log(L_DEBUG, "Got workspace update."); |
1028 | uint32_t len; | 1028 | struct ipc_response *resp = ipc_recv_response(ipc_event_socketfd); |
1029 | char *buf = ipc_recv_response(ipc_event_socketfd, &len); | 1029 | free_ipc_response(resp); |
1030 | free(buf); | ||
1031 | ipc_update_workspaces(); | 1030 | ipc_update_workspaces(); |
1032 | dirty = true; | 1031 | dirty = true; |
1033 | } | 1032 | } |