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/ChkTypWEv.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'nx-X11/lib/X11/ChkTypWEv.c') diff --git a/nx-X11/lib/X11/ChkTypWEv.c b/nx-X11/lib/X11/ChkTypWEv.c index cbf8355fe..92b3f5d94 100644 --- a/nx-X11/lib/X11/ChkTypWEv.c +++ b/nx-X11/lib/X11/ChkTypWEv.c @@ -29,23 +29,27 @@ 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 XCheckTypedWindowEvent (dpy, w, type, event) - register Display *dpy; - Window w; /* Selected window. */ - int type; /* Selected event type. */ - register XEvent *event; /* XEvent to be filled in. */ +Bool XCheckTypedWindowEvent ( + register Display *dpy, + Window w, /* Selected window. */ + 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