summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-10-11 21:19:00 -0700
committerKeith Packard <keithp@keithp.com>2008-10-11 21:51:20 -0700
commitc0227e77a62a422332edda6c8d8113fb4980ac7d (patch)
tree9b5e0f11738fe618faea4b284a0d2b4959962926
parent11308c41fe4c1bf99a6654fca294f3e098075a33 (diff)
Make sure each thread sees its expose event.
Having a thread call XNextEvent may cause other threads to miss their initial expose event, blocking them for a long time. Use the existing predicate function and XIfEvent to wait for precisely the right expose event. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--ico.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ico.c b/ico.c
index 8b93b10..0c75962 100644
--- a/ico.c
+++ b/ico.c
@@ -920,7 +920,7 @@ do_ico_window(void *ptr)
printf("thread %x waiting for Expose\n", xthread_self());
#endif
for (;;) {
- XNextEvent(dpy, &xev);
+ XIfEvent(dpy, &xev, predicate, (XPointer) closure->draw_window);
if (xev.type == Expose)
break;
}