*in progress*
[winnie] / src / event.cc
index e5a7182..1586c95 100644 (file)
@@ -1,6 +1,9 @@
+#include <stdio.h>
+
 #include <errno.h>
 #include <unistd.h>
 #include <sys/select.h>
+
 #include "event.h"
 #include "wm.h"
 #include "keyboard.h"
@@ -12,6 +15,8 @@ void process_events()
        int mouse_fd = get_mouse_fd();
 
        for(;;) {
+               wm->process_windows();
+
                fd_set read_set;
 
                FD_ZERO(&read_set);
@@ -23,12 +28,11 @@ void process_events()
                while(select(maxfd + 1, &read_set, 0, 0, 0) == -1 && errno == EINTR);
 
                if(FD_ISSET(keyb_fd, &read_set)) {
+                       printf("WINNIE TODO PROCESS KEYB\n");
                        process_keyboard_event();
                }
                if(FD_ISSET(mouse_fd, &read_set)) {
                        process_mouse_event();
                }
-
-               wm->process_windows();
        }
 }