From 687d44b6eaa3c64a12af9bbd557b401419b208eb Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 29 Jul 2016 00:44:38 +0200 Subject: update src files *[ch] to libX11 1.3.4 --- nx-X11/lib/X11/ChkTypEv.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'nx-X11/lib/X11/ChkTypEv.c') 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; -- cgit v1.2.3