[xorg-x11-server] Don't try to build Xwayland in F20

Adam Jackson ajax at fedoraproject.org
Wed May 21 16:18:54 UTC 2014


commit 05b46a296ebaf424a49aa3ab80197d57caaeaf05
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed May 21 12:18:48 2014 -0400

    Don't try to build Xwayland in F20
    
    - Fix shadowfb initialization to, er, work

 0001-shadowfb-Fix-initialization.patch |   87 ++++++++++++++++++++++++++++++++
 xorg-x11-server.spec                   |   16 +++++-
 2 files changed, 101 insertions(+), 2 deletions(-)
---
diff --git a/0001-shadowfb-Fix-initialization.patch b/0001-shadowfb-Fix-initialization.patch
new file mode 100644
index 0000000..e366c91
--- /dev/null
+++ b/0001-shadowfb-Fix-initialization.patch
@@ -0,0 +1,87 @@
+From a02af447e0e845979a313bb248cf3506d4926a38 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Mon, 19 May 2014 16:16:43 -0400
+Subject: [PATCH] shadowfb: Fix initialization
+
+This has to run at initial CreateWindow time, at CreateScreenResources
+the root window doesn't actually exist yet.
+
+Tested-by: Michael Thayer <michael.thayer at oracle.com>
+Signed-off-by: Adam Jackson <ajax at redhat.com>
+---
+ hw/xfree86/shadowfb/shadow.c | 26 +++++++++++++++-----------
+ 1 file changed, 15 insertions(+), 11 deletions(-)
+
+diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
+index 10f72cc..d2481ed 100644
+--- a/hw/xfree86/shadowfb/shadow.c
++++ b/hw/xfree86/shadowfb/shadow.c
+@@ -29,14 +29,14 @@
+ #include "picturestr.h"
+ 
+ static Bool ShadowCloseScreen(ScreenPtr pScreen);
+-static Bool ShadowCreateScreenResources(ScreenPtr pScreen);
++static Bool ShadowCreateRootWindow(WindowPtr pWin);
+ 
+ typedef struct {
+     ScrnInfoPtr pScrn;
+     RefreshAreaFuncPtr preRefresh;
+     RefreshAreaFuncPtr postRefresh;
+     CloseScreenProcPtr CloseScreen;
+-    CreateScreenResourcesProcPtr CreateScreenResources;
++    CreateWindowProcPtr CreateWindow;
+ } ShadowScreenRec, *ShadowScreenPtr;
+ 
+ static DevPrivateKeyRec ShadowScreenKeyRec;
+@@ -71,10 +71,10 @@ ShadowFBInit2(ScreenPtr pScreen,
+     pPriv->postRefresh = postRefreshArea;
+ 
+     pPriv->CloseScreen = pScreen->CloseScreen;
+-    pPriv->CreateScreenResources = pScreen->CreateScreenResources;
++    pPriv->CreateWindow = pScreen->CreateWindow;
+ 
+     pScreen->CloseScreen = ShadowCloseScreen;
+-    pScreen->CreateScreenResources = ShadowCreateScreenResources;
++    pScreen->CreateWindow = ShadowCreateRootWindow;
+ 
+     return TRUE;
+ }
+@@ -117,16 +117,21 @@ shadowfbReportPost(DamagePtr damage, RegionPtr reg, void *closure)
+ }
+ 
+ static Bool
+-ShadowCreateScreenResources(ScreenPtr pScreen)
++ShadowCreateRootWindow(WindowPtr pWin)
+ {
+     Bool ret;
+-    WindowPtr pWin = pScreen->root;
++    ScreenPtr pScreen = pWin->drawable.pScreen;
+     ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen);
+ 
+-    pScreen->CreateScreenResources = pPriv->CreateScreenResources;
+-    ret = pScreen->CreateScreenResources(pScreen);
+-    pPriv->CreateScreenResources = pScreen->CreateScreenResources;
+-    pScreen->CreateScreenResources = ShadowCreateScreenResources;
++    /* paranoia */
++    if (pWin != pScreen->root)
++        ErrorF("ShadowCreateRootWindow called unexpectedly\n");
++
++    /* call down, but don't hook ourselves back in; we know the first time
++     * we're called it's for the root window.
++     */
++    pScreen->CreateWindow = pPriv->CreateWindow;
++    ret = pScreen->CreateWindow(pWin);
+ 
+     /* this might look like it leaks, but the damage code reaps listeners
+      * when their drawable disappears.
+@@ -159,7 +164,6 @@ ShadowCloseScreen(ScreenPtr pScreen)
+     ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen);
+ 
+     pScreen->CloseScreen = pPriv->CloseScreen;
+-    pScreen->CreateScreenResources = pPriv->CreateScreenResources;
+ 
+     free(pPriv);
+ 
+-- 
+1.9.0
+
diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec
index 2e0b5b9..feea178 100644
--- a/xorg-x11-server.spec
+++ b/xorg-x11-server.spec
@@ -42,7 +42,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.15.99.902
-Release:   6%{?gitdate:.%{gitdate}}%{dist}
+Release:   7%{?gitdate:.%{gitdate}}%{dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X
@@ -96,6 +96,8 @@ Patch8041: 0001-pixmap-fix-reverse-optimus-support-with-multiple-hea.patch
 
 # submitted: http://lists.x.org/archives/xorg-devel/2013-October/037996.html
 Patch9100: exa-only-draw-valid-trapezoids.patch
+# submitted: http://lists.x.org/archives/xorg-devel/2014-May/042497.html
+Patch9101: 0001-shadowfb-Fix-initialization.patch
 
 # because the display-managers are not ready yet, do not upstream
 Patch10000: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch
@@ -295,7 +297,7 @@ X protocol, and therefore supports the newer X extensions like
 Render and Composite.
 
 
-%if !0%{?rhel}
+%if !0%{?rhel} || 0%{?fedora} > 20
 %package Xwayland
 Summary: Wayland X Sserver.
 Group: User Interface/X
@@ -395,7 +397,11 @@ test `getminor extension` == %{extension_minor}
 
 %if 0%{?fedora}
 %global bodhi_flags --with-vendor-name="Fedora Project"
+%if 0%{?fedora} > 20
 %global wayland --enable-xwayland
+%else
+%global wayland --disable-xwayland
+%endif
 %endif
 
 # ick
@@ -589,8 +595,10 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
 %{_bindir}/Xephyr
 %{_mandir}/man1/Xephyr.1*
 
+%if !0%{?rhel} || 0%{?fedora} < 21
 %files Xwayland
 %{_bindir}/Xwayland
+%endif
 
 %if %{with_hw_servers}
 %files devel
@@ -608,6 +616,10 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
 
 
 %changelog
+* Wed May 21 2014 Adam Jackson <ajax at redhat.com> 1.15.99.902-7
+- Don't try to build Xwayland in F20
+- Fix shadowfb initialization to, er, work
+
 * Wed May 14 2014 Peter Hutterer <peter.hutterer at redhat.com> - 1.15.99.902-6.20140428
 - Revert button mapping for Evoluent Vertical mouse, the default mapping
   matches the manufacturer's documentation (#612140)


More information about the scm-commits mailing list