aboutsummaryrefslogtreecommitdiff
path: root/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'events.c')
-rw-r--r--events.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/events.c b/events.c
index 54121ea..ccc5f2e 100644
--- a/events.c
+++ b/events.c
@@ -22,6 +22,7 @@
#include <X11/keysym.h>
#include "events.h"
+#include "window.h"
extern Display *dpy;
@@ -55,4 +56,10 @@ static void (*handler[LASTEvent])(app_t*, XEvent*) = {
};
void event_loop(app_t *app) {
+ XEvent ev;
+
+ while (!XNextEvent(dpy, &ev)) {
+ if (handler[ev.type])
+ handler[ev.type](app, &ev);
+ }
}