From c36b84749d9139ca0aa62d6259e3086d6e0abf60 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Jun 30 2014 16:03:57 +0000 Subject: libX11 1.6.2 plus a fix for interleaved xcb/xlib usage - Use >= for the -common Requires --- diff --git a/.gitignore b/.gitignore index b8c3f18..846e99b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ libX11-1.3.99.901.tar.bz2 /libX11-1.5.99.902.tar.bz2 /libX11-1.6.0.tar.bz2 /libX11-1.6.1.tar.bz2 +/libX11-1.6.2.tar.bz2 diff --git a/0001-Fix-XNextRequest-after-direct-usage-of-XCB.patch b/0001-Fix-XNextRequest-after-direct-usage-of-XCB.patch new file mode 100644 index 0000000..16355f1 --- /dev/null +++ b/0001-Fix-XNextRequest-after-direct-usage-of-XCB.patch @@ -0,0 +1,87 @@ +From 7f8f9a36ef901f31279c385caf960a22daeb33fe Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" +Date: Fri, 9 May 2014 18:21:05 -0400 +Subject: [PATCH] Fix XNextRequest() after direct usage of XCB + +When XCB owns the X socket, dpy->request is not updated, so +NextRequest() and XNextRequest() return the wrong value. There's +nothing we can do to fix NextRequest() while retaining ABI compat, +but change XNextRequest() to grab the socket back from XCB, +updating dpy->request. + +Signed-off-by: Owen W. Taylor +Reviewed-by: Uli Schlachter +Signed-off-by: Alan Coopersmith +--- + src/Macros.c | 14 +++++++++++++- + src/Xxcbint.h | 2 ++ + src/xcb_io.c | 11 +++++++++++ + 3 files changed, 26 insertions(+), 1 deletion(-) + +diff --git a/src/Macros.c b/src/Macros.c +index cfc083a..394a764 100644 +--- a/src/Macros.c ++++ b/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/src/Xxcbint.h b/src/Xxcbint.h +index a8c9a67..bf41c23 100644 +--- a/src/Xxcbint.h ++++ b/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/src/xcb_io.c b/src/xcb_io.c +index 727c6c7..5987329 100644 +--- a/src/xcb_io.c ++++ b/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); ++} +-- +2.0.0 + diff --git a/libX11.spec b/libX11.spec index f622546..96d471b 100644 --- a/libX11.spec +++ b/libX11.spec @@ -4,8 +4,8 @@ Summary: Core X11 protocol client library Name: libX11 -Version: 1.6.1 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Version: 1.6.2 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.x.org @@ -18,6 +18,7 @@ Source2: commitid Source0: http://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.bz2 %endif +Patch0: 0001-Fix-XNextRequest-after-direct-usage-of-XCB.patch Patch2: dont-forward-keycode-0.patch BuildRequires: xorg-x11-util-macros >= 1.11 BuildRequires: pkgconfig(xproto) >= 7.0.15 @@ -26,7 +27,7 @@ BuildRequires: libxcb-devel >= 1.2 BuildRequires: pkgconfig(xau) pkgconfig(xdmcp) BuildRequires: perl(Pod::Usage) -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-common >= %{version}-%{release} %description Core X11 protocol client library. @@ -49,6 +50,7 @@ X.Org X11 libX11 development package %prep %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} +%patch0 -p1 -b .xcb %patch2 -p1 -b .dont-forward-keycode-0 %build @@ -113,6 +115,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/*.5* %changelog +* Mon Jun 30 2014 Adam Jackson 1.6.2-1 +- libX11 1.6.2 plus a fix for interleaved xcb/xlib usage +- Use >= for the -common Requires + * Sat Jun 07 2014 Fedora Release Engineering - 1.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index ca31a5d..e13b3bd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bc5fc459ec25a50c5a7e27035b89e579 libX11-1.6.1.tar.bz2 +c35d6ad95b06635a524579e88622fdb5 libX11-1.6.2.tar.bz2