projects
/
dana
/
dcompmgr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f1e791
)
fix the select() call to work after it has timed out, and always flush at the end...
author
Dana Jansens
<danakj@orodu.net>
Wed, 5 Mar 2008 01:09:35 +0000
(20:09 -0500)
committer
Dana Jansens
<danakj@orodu.net>
Wed, 5 Mar 2008 01:10:14 +0000
(20:10 -0500)
dcompmgr.c
patch
|
blob
|
history
diff --git
a/dcompmgr.c
b/dcompmgr.c
index
f441f8a
..
d39b101
100644
(file)
--- a/
dcompmgr.c
+++ b/
dcompmgr.c
@@
-136,12
+136,6
@@
static void
run(d_display_t *dpy)
{
gboolean quit;
run(d_display_t *dpy)
{
gboolean quit;
- fd_set fds;
- int max = -1;
-
- FD_ZERO(&fds);
- FD_SET(dpy->fd, &fds);
- max = MAX(max, dpy->fd);
paint(dpy);
paint(dpy);
@@
-150,6
+144,7
@@
run(d_display_t *dpy)
struct timeval next, now, *wait;
int r, npaint;
d_list_it_t *it;
struct timeval next, now, *wait;
int r, npaint;
d_list_it_t *it;
+ fd_set fds;
npaint = 0;
for (it = list_top(dpy->screens); it; it = it->next) {
npaint = 0;
for (it = list_top(dpy->screens); it; it = it->next) {
@@
-181,7
+176,10
@@
run(d_display_t *dpy)
wait = &next;
}
wait = &next;
}
- r = select(max+1, &fds, NULL, NULL, wait);
+ FD_ZERO(&fds);
+ FD_SET(dpy->fd, &fds);
+
+ r = select(dpy->fd+1, &fds, NULL, NULL, wait);
if (r < 0)
printf("select error\n");
else if (r == 0) {
if (r < 0)
printf("select error\n");
else if (r == 0) {
@@
-197,6
+195,8
@@
run(d_display_t *dpy)
if (xcb_connection_has_error(dpy->conn))
quit = TRUE;
if (xcb_connection_has_error(dpy->conn))
quit = TRUE;
+ else
+ xcb_flush(dpy->conn);
}
}
}
}