summaryrefslogtreecommitdiff
path: root/lib/libX11/src/NextEvent.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-05-18 19:37:37 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-05-18 19:37:37 +0000
commited8b5dc3d5426f4774308a46ca2835134844f28e (patch)
tree6a84e81f8ccf7faf4497c80e83bfc921a532648f /lib/libX11/src/NextEvent.c
parentb10ed8a977078fdc40846586222217fa9255196d (diff)
Update to libX11 1.3.3. Tested on a bulk ports build by naddy@.
Diffstat (limited to 'lib/libX11/src/NextEvent.c')
-rw-r--r--lib/libX11/src/NextEvent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libX11/src/NextEvent.c b/lib/libX11/src/NextEvent.c
index d4f72e773..286579170 100644
--- a/lib/libX11/src/NextEvent.c
+++ b/lib/libX11/src/NextEvent.c
@@ -1,4 +1,3 @@
-/* $Xorg: NextEvent.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */
/*
Copyright 1986, 1998 The Open Group
@@ -24,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/lib/X11/NextEvent.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */
#define NEED_EVENTS
#ifdef HAVE_CONFIG_H
@@ -46,11 +44,15 @@ XNextEvent (
LockDisplay(dpy);
+ /* Delete unclaimed cookies */
+ _XFreeEventCookies(dpy);
+
if (dpy->head == NULL)
_XReadEvents(dpy);
qelt = dpy->head;
*event = qelt->event;
_XDeq(dpy, NULL, qelt);
+ _XStoreEventCookie(dpy, event);
UnlockDisplay(dpy);
return 0;
}