aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/ChkTypWEv.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-07-29 00:44:38 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-08-24 23:05:45 +0200
commitacfe0013c9d1ef1344c7813d4dae51ba6f2da622 (patch)
treeba17af85081b346a6b0e753fd9ac1e590a4ca494 /nx-X11/lib/X11/ChkTypWEv.c
parent35145c251305a562c4273d712fab5b4b387913ab (diff)
downloadnx-libs-acfe0013c9d1ef1344c7813d4dae51ba6f2da622.tar.gz
nx-libs-acfe0013c9d1ef1344c7813d4dae51ba6f2da622.tar.bz2
nx-libs-acfe0013c9d1ef1344c7813d4dae51ba6f2da622.zip
update src files *[ch] to libX11 1.3.4
Diffstat (limited to 'nx-X11/lib/X11/ChkTypWEv.c')
-rw-r--r--nx-X11/lib/X11/ChkTypWEv.c16
1 files changed, 10 insertions, 6 deletions
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;