6 #include <sys/select.h>
15 int keyb_fd = get_keyboard_fd();
16 int mouse_fd = get_mouse_fd();
19 wm->process_windows();
24 FD_SET(keyb_fd, &read_set);
25 FD_SET(mouse_fd, &read_set);
27 int maxfd = keyb_fd > mouse_fd ? keyb_fd : mouse_fd;
29 while(select(maxfd + 1, &read_set, 0, 0, 0) == -1 && errno == EINTR);
31 if(FD_ISSET(keyb_fd, &read_set)) {
32 process_keyboard_event();
34 if(FD_ISSET(mouse_fd, &read_set)) {
35 process_mouse_event();
39 #endif // WINNIE_FBDEV