diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-28 23:04:20 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-29 22:11:08 -0400 |
commit | cab1352801b62d1b8a12ca1c995cb24445ce4bc9 (patch) | |
tree | bc67373916c06d48700c4f69b8c2470a2f86887f /swaybar/event_loop.c | |
parent | Allow sway IPC clients to fall back to i3 socket (diff) | |
download | sway-cab1352801b62d1b8a12ca1c995cb24445ce4bc9.tar.gz sway-cab1352801b62d1b8a12ca1c995cb24445ce4bc9.tar.zst sway-cab1352801b62d1b8a12ca1c995cb24445ce4bc9.zip |
Start port of swaybar to layer shell
This starts up the event loop and wayland display and shims out the
basic top level rendering concepts. Also includes some changes to
incorporate pango into the 1.x codebase properly.
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 | } |