diff options
Diffstat (limited to 'nx-X11/lib/X11/ChkTypEv.c')
-rw-r--r-- | nx-X11/lib/X11/ChkTypEv.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/nx-X11/lib/X11/ChkTypEv.c b/nx-X11/lib/X11/ChkTypEv.c index 558099c1b..8ca1c8048 100644 --- a/nx-X11/lib/X11/ChkTypEv.c +++ b/nx-X11/lib/X11/ChkTypEv.c @@ -29,22 +29,26 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -/* +/* * Check existing events in queue to find if any match. If so, return. * If not, flush buffer and see if any more events are readable. If one * matches, return. If all else fails, tell the user no events found. */ -Bool XCheckTypedEvent (dpy, type, event) - register Display *dpy; - int type; /* Selected event type. */ - register XEvent *event; /* XEvent to be filled in. */ +Bool XCheckTypedEvent ( + register Display *dpy, + int type, /* Selected event type. */ + register XEvent *event) /* XEvent to be filled in. */ { register _XQEvent *prev, *qelt; unsigned long qe_serial = 0; int n; /* time through count */ LockDisplay(dpy); + + /* Delete unclaimed cookies */ + _XFreeEventCookies(dpy); + prev = NULL; for (n = 3; --n >= 0;) { for (qelt = prev ? prev->next : dpy->head; |