aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/bar.c6
-rw-r--r--swaybar/status_line.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index 8e89c9a8..be290c18 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -647,7 +647,7 @@ static void status_in(int fd, short mask, void *data) {
if (mask & (POLLHUP | POLLERR)) {
status_error(bar->status, "[error reading from status command]");
set_bar_dirty(bar);
- loop_remove_event(bar->eventloop, bar->status_event);
+ loop_remove_fd(bar->eventloop, fd);
} else if (status_handle_readable(bar->status)) {
set_bar_dirty(bar);
}
@@ -658,8 +658,8 @@ void bar_run(struct swaybar *bar) {
display_in, bar);
loop_add_fd(bar->eventloop, bar->ipc_event_socketfd, POLLIN, ipc_in, bar);
if (bar->status) {
- bar->status_event = loop_add_fd(
- bar->eventloop, bar->status->read_fd, POLLIN, status_in, bar);
+ loop_add_fd(bar->eventloop, bar->status->read_fd, POLLIN,
+ status_in, bar);
}
while (1) {
wl_display_flush(bar->display);
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index 3f7a386f..65d6c052 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -16,7 +16,7 @@
static void status_line_close_fds(struct status_line *status) {
if (status->read_fd != -1) {
- loop_remove_event(status->bar->eventloop, status->bar->status_event);
+ loop_remove_fd(status->bar->eventloop, status->read_fd);
close(status->read_fd);
status->read_fd = -1;
}