diff options
author | 2018-04-12 20:19:54 -0400 | |
---|---|---|
committer | 2018-04-12 20:19:54 -0400 | |
commit | cd1b32453a9296c18b28bff71607aeb22987b5cd (patch) | |
tree | c653c6d525b471914c01a9d7ae543f521b6138ed /swaybar/event_loop.c | |
parent | Merge pull request #1634 from aleksander/master (diff) | |
parent | Fix separator height calculation (diff) | |
download | sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.gz sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.zst sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.zip |
Merge branch 'wlroots'
Diffstat (limited to 'swaybar/event_loop.c')
-rw-r--r-- | swaybar/event_loop.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/swaybar/event_loop.c b/swaybar/event_loop.c index 0d1be1da..748372ed 100644 --- a/swaybar/event_loop.c +++ b/swaybar/event_loop.c | |||
@@ -4,19 +4,18 @@ | |||
4 | #include <string.h> | 4 | #include <string.h> |
5 | #include <strings.h> | 5 | #include <strings.h> |
6 | #include <poll.h> | 6 | #include <poll.h> |
7 | #include "swaybar/bar.h" | 7 | #include <time.h> |
8 | #include "swaybar/event_loop.h" | 8 | #include "swaybar/event_loop.h" |
9 | #include "list.h" | 9 | #include "list.h" |
10 | #include "log.h" | ||
11 | 10 | ||
12 | struct event_item { | 11 | struct event_item { |
13 | void(*cb)(int fd, short mask, void *data); | 12 | void (*cb)(int fd, short mask, void *data); |
14 | void *data; | 13 | void *data; |
15 | }; | 14 | }; |
16 | 15 | ||
17 | struct timer_item { | 16 | struct timer_item { |
18 | timer_t timer; | 17 | timer_t timer; |
19 | void(*cb)(timer_t timer, void *data); | 18 | void (*cb)(timer_t timer, void *data); |
20 | void *data; | 19 | void *data; |
21 | }; | 20 | }; |
22 | 21 | ||
@@ -138,7 +137,8 @@ void event_loop_poll() { | |||
138 | void init_event_loop() { | 137 | void init_event_loop() { |
139 | event_loop.fds.length = 0; | 138 | event_loop.fds.length = 0; |
140 | event_loop.fds.capacity = 10; | 139 | event_loop.fds.capacity = 10; |
141 | event_loop.fds.items = malloc(event_loop.fds.capacity * sizeof(struct pollfd)); | 140 | event_loop.fds.items = malloc( |
141 | event_loop.fds.capacity * sizeof(struct pollfd)); | ||
142 | event_loop.items = create_list(); | 142 | event_loop.items = create_list(); |
143 | event_loop.timers = create_list(); | 143 | event_loop.timers = create_list(); |
144 | } | 144 | } |