diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2016-07-26 00:34:34 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-08-24 21:24:38 +0200 |
commit | 2ebef6288467ce0f0583a0d0d2ef9afd637ee7e6 (patch) | |
tree | 3b4f8ab9073ce6f8f1691bfc850956af9029c411 /nx-X11/lib/X11/PeekEvent.c | |
parent | 05caffc957f3fa59f8a05732072459ae16514c5a (diff) | |
download | nx-libs-2ebef6288467ce0f0583a0d0d2ef9afd637ee7e6.tar.gz nx-libs-2ebef6288467ce0f0583a0d0d2ef9afd637ee7e6.tar.bz2 nx-libs-2ebef6288467ce0f0583a0d0d2ef9afd637ee7e6.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; } |