diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2016-07-26 00:34:34 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-10 22:52:21 +0200 |
commit | 5930731421ae76931301302c515d75001b9f72a0 (patch) | |
tree | 15dd959289aade4477c17bb9bc21a8731d06c62b /nx-X11/lib/X11/PeekEvent.c | |
parent | a053df0a77455879dc7a23601ba21b579a0b13e7 (diff) | |
download | nx-libs-5930731421ae76931301302c515d75001b9f72a0.tar.gz nx-libs-5930731421ae76931301302c515d75001b9f72a0.tar.bz2 nx-libs-5930731421ae76931301302c515d75001b9f72a0.zip |
update all files with NX relevant changes to libX11 1.3.4
Diffstat (limited to 'nx-X11/lib/X11/PeekEvent.c')
-rw-r--r-- | nx-X11/lib/X11/PeekEvent.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/nx-X11/lib/X11/PeekEvent.c b/nx-X11/lib/X11/PeekEvent.c index 218c9a6dd..ffbaa05b4 100644 --- a/nx-X11/lib/X11/PeekEvent.c +++ b/nx-X11/lib/X11/PeekEvent.c @@ -29,17 +29,18 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -/* +/* * Return the next event in the queue, * BUT do not remove it from the queue. * If none found, flush and wait until there is an event to peek. */ int -XPeekEvent (dpy, event) - register Display *dpy; - register XEvent *event; +XPeekEvent ( + register Display *dpy, + register XEvent *event) { + XEvent copy; LockDisplay(dpy); if (dpy->head == NULL) _XReadEvents(dpy); @@ -47,9 +48,13 @@ XPeekEvent (dpy, event) if (_XGetIOError(dpy)) { UnlockDisplay(dpy); return 1; - } + } #endif *event = (dpy->head)->event; + if (_XCopyEventCookie(dpy, &event->xcookie, ©.xcookie)) { + _XStoreEventCookie(dpy, ©); + *event = copy; + } UnlockDisplay(dpy); return 1; } |