aboutsummaryrefslogtreecommitdiff
path: root/libX11/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-05-23 19:36:09 +0200
committermarha <marha@users.sourceforge.net>2014-05-23 19:38:24 +0200
commit63bfcd0be46413dda8c22b914d12f66ea5d5c66d (patch)
tree252bfea78ff3ccfabedc3b84c8a7331c74e902cd /libX11/src
parent55cf29d7f748b814a2b8eb016fbf15635d56aa53 (diff)
downloadvcxsrv-63bfcd0be46413dda8c22b914d12f66ea5d5c66d.tar.gz
vcxsrv-63bfcd0be46413dda8c22b914d12f66ea5d5c66d.tar.bz2
vcxsrv-63bfcd0be46413dda8c22b914d12f66ea5d5c66d.zip
libX11 mesa xserver pixman git update 23 May 2014
xserver commit db2e708f31a162c6c66643d3559dd5f3e21ee06b libX11 commit e3dc0d17339e61eaf0b51b8907510984e3bf23cb pixman commit 9cd283b2eb8279824406bfd47b020d21fc00cf82 mesa commit 404387ecd72a4a9ace8c1fa6895823aabfd759ad
Diffstat (limited to 'libX11/src')
-rw-r--r--libX11/src/Macros.c14
-rw-r--r--libX11/src/Xxcbint.h2
-rw-r--r--libX11/src/xcb_io.c11
3 files changed, 26 insertions, 1 deletions
diff --git a/libX11/src/Macros.c b/libX11/src/Macros.c
index cfc083a01..394a7641f 100644
--- a/libX11/src/Macros.c
+++ b/libX11/src/Macros.c
@@ -30,6 +30,7 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
#define XUTIL_DEFINE_FUNCTIONS
#include "Xutil.h"
+#include "Xxcbint.h"
/*
* This file makes full definitions of routines for each macro.
@@ -135,9 +136,20 @@ int XBitmapPad(Display *dpy) { return (BitmapPad(dpy)); }
int XImageByteOrder(Display *dpy) { return (ImageByteOrder(dpy)); }
+/* XNextRequest() differs from the rest of the functions here because it is
+ * no longer a macro wrapper - when libX11 is being used mixed together
+ * with direct use of xcb, the next request field of the Display structure will
+ * not be updated. We can't fix the NextRequest() macro in any easy way,
+ * but we can at least make XNextRequest() do the right thing.
+ */
unsigned long XNextRequest(Display *dpy)
{
- return (NextRequest(dpy));
+ unsigned long next_request;
+ LockDisplay(dpy);
+ next_request = _XNextRequest(dpy);
+ UnlockDisplay(dpy);
+
+ return next_request;
}
unsigned long XLastKnownRequestProcessed(Display *dpy)
diff --git a/libX11/src/Xxcbint.h b/libX11/src/Xxcbint.h
index a8c9a670b..bf41c23ff 100644
--- a/libX11/src/Xxcbint.h
+++ b/libX11/src/Xxcbint.h
@@ -46,4 +46,6 @@ typedef struct _X11XCBPrivate {
int _XConnectXCB(Display *dpy, _Xconst char *display, int *screenp);
void _XFreeX11XCBStructure(Display *dpy);
+unsigned long _XNextRequest(Display *dpy);
+
#endif /* XXCBINT_H */
diff --git a/libX11/src/xcb_io.c b/libX11/src/xcb_io.c
index 727c6c79f..59873296c 100644
--- a/libX11/src/xcb_io.c
+++ b/libX11/src/xcb_io.c
@@ -774,3 +774,14 @@ void _XEatDataWords(Display *dpy, unsigned long n)
dpy->xcb->reply_consumed = dpy->xcb->reply_length;
_XFreeReplyData(dpy, False);
}
+
+unsigned long
+_XNextRequest(Display *dpy)
+{
+ /* This will update dpy->request. The assumption is that the next thing
+ * that the application will do is make a request so there's little
+ * overhead.
+ */
+ require_socket(dpy);
+ return NextRequest(dpy);
+}