aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/main.c
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-03 20:40:50 +0100
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-03 20:40:50 +0100
commit7298a9c67aed2d7a5c5c1df55bfa6052cac04d51 (patch)
treeaf92196751fdc7cc326b8e6a32c1c62983fd30bb /swaybar/main.c
parentAdd IPC event types (diff)
downloadsway-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/main.c')
-rw-r--r--swaybar/main.c5
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 }