[PATCH] qxl: Fix build against video ABI 8

Christopher James Halse Rogers christopher.halse.rogers at canonical.com
Tue Aug 10 01:11:11 PDT 2010


PaintWindowBackground and PaintWindowBorder haven't been
used in a while and have been removed from the Screen
struct in Xserver 1.9.

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com>
---
 src/qxl.h        |    2 ++
 src/qxl_driver.c |    7 ++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/qxl.h b/src/qxl.h
index cf25ee4..73b3bc2 100644
--- a/src/qxl.h
+++ b/src/qxl.h
@@ -509,8 +509,10 @@ struct _qxl_screen_t
     CreateScreenResourcesProcPtr create_screen_resources;
     CloseScreenProcPtr		close_screen;
     CreateGCProcPtr		create_gc;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 8
     PaintWindowProcPtr		paint_window_background;
     PaintWindowProcPtr		paint_window_border;
+#endif
     CopyWindowProcPtr		copy_window;
     
     DamagePtr			damage;
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 187e581..36cec6e 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -873,6 +873,7 @@ qxl_fill_region_solid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel)
 		       fbReplicatePixel (pixel, pDrawable->bitsPerPixel));
 }
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 8
 static void
 qxl_paint_window(WindowPtr pWin, RegionPtr pRegion, int what)
 {
@@ -893,6 +894,7 @@ qxl_paint_window(WindowPtr pWin, RegionPtr pRegion, int what)
 
     qxl->paint_window_border (pWin, pRegion, what);
 }
+#endif
 
 static void
 qxl_copy_window (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
@@ -1036,11 +1038,14 @@ qxl_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     qxl->create_gc = pScreen->CreateGC;
     pScreen->CreateGC = qxl_create_gc;
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 8
     qxl->paint_window_background = pScreen->PaintWindowBackground;
     qxl->paint_window_border = pScreen->PaintWindowBorder;
-    qxl->copy_window = pScreen->CopyWindow;
     pScreen->PaintWindowBackground = qxl_paint_window;
     pScreen->PaintWindowBorder = qxl_paint_window;
+#endif
+
+    qxl->copy_window = pScreen->CopyWindow;
     pScreen->CopyWindow = qxl_copy_window;
 
     miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
-- 
1.7.1



More information about the xorg-devel mailing list