*drive-thru whale bends over and eats the Europapean lobster*
This commit is contained in:
parent
086cd2ae62
commit
ae825ad58d
2 changed files with 9 additions and 3 deletions
|
@ -388,6 +388,11 @@ int main(int argc, char **argv) {
|
|||
.tv_usec = 0
|
||||
};
|
||||
|
||||
struct timeval timeout = {
|
||||
.tv_sec = 0,
|
||||
.tv_usec = 250000
|
||||
};
|
||||
|
||||
cairo_t *fg, *bg;
|
||||
|
||||
if ((can_if = hexagram_can_if_open("vcan0")) == NULL)
|
||||
|
@ -416,8 +421,8 @@ int main(int argc, char **argv) {
|
|||
* Present the background layer
|
||||
*/
|
||||
hexagram_window_refresh_bg(window);
|
||||
hexagram_window_show(window);
|
||||
hexagram_window_swap_buffer(window);
|
||||
hexagram_window_show(window);
|
||||
|
||||
/*
|
||||
* Set up file descriptors to monitor
|
||||
|
@ -438,6 +443,7 @@ int main(int argc, char **argv) {
|
|||
XNextEvent(display, &e);
|
||||
|
||||
switch (e.type) {
|
||||
case MapNotify:
|
||||
case Expose:
|
||||
hexagram_window_refresh_bg(window);
|
||||
hexagram_window_swap_buffer(window);
|
||||
|
@ -455,7 +461,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
memcpy(&rready, &rfds, sizeof(rfds));
|
||||
|
||||
if (select(fd2, &rready, NULL, NULL, NULL) < 0) {
|
||||
if (select(fd2, &rready, NULL, NULL, &timeout) < 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ int hexagram_window_display_fd(hexagram_window *window) {
|
|||
|
||||
int hexagram_window_show(hexagram_window *window) {
|
||||
if (XSelectInput(window->display, window->win,
|
||||
ExposureMask | ButtonPressMask | KeyPressMask) == 0) {
|
||||
HEXAGRAM_WINDOW_EVENT_MASK) == 0) {
|
||||
goto error_x;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue