[PATCH] Only use dixScreenSpecificPrivatesSize if we have a new enough Xorg.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This lets us continue to support older Xorg releases.
This reverts 4f37cd85 and partially reverts 4a43bd4.
---
 configure.ac     |    2 +-
 src/qxl_driver.c |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index b8a4b35..11ef73c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,7 +60,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
 XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
 
 # Obtain compiler/linker options for the driver dependencies
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.12.99.901] xproto fontsproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto $REQUIRED_MODULES)
 
 save_CFLAGS="$CFLAGS"
 CFLAGS="$XORG_CFLAGS"
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index c7b8486..d31eafc 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -1786,10 +1786,14 @@ qxl_screen_init (SCREEN_INIT_ARGS_DECL)
     DamageSetup (pScreen);
     
     /* We need to set totalPixmapSize after setup_uxa and Damage,
-     * as the privatssize is not computed correctly until then
+       as the privates size is not computed correctly until then
      */
+#if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 12, 99, 901, 0))
+    pScreen->totalPixmapSize = BitmapBytePad ((sizeof (PixmapRec) + dixPrivatesSize (PRIVATE_PIXMAP) ) * 8);
+#else
     pScreen->totalPixmapSize = BitmapBytePad((sizeof(PixmapRec) +
 			    dixScreenSpecificPrivatesSize(pScreen, PRIVATE_PIXMAP) ) * 8);
+#endif
 
     miDCInitialize (pScreen, xf86GetPointerScreenFuncs());
     if (!miCreateDefColormap (pScreen))
-- 
1.7.10.4


_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]