summaryrefslogtreecommitdiff
path: root/uxa/uxa.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-02-24 18:22:20 -0800
committerEric Anholt <eric@anholt.net>2009-02-26 14:20:42 -0800
commit22dc9a5580d77cc4707bfb8e19474e611a06ae9a (patch)
tree91a60fbcc1fba6b315549c7b112728320c5f30ec /uxa/uxa.c
parentcb1f7ec0876746c1b52b63cdb508544e9e4e32e3 (diff)
Fix UXA for server 1.4.
Diffstat (limited to 'uxa/uxa.c')
-rw-r--r--uxa/uxa.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/uxa/uxa.c b/uxa/uxa.c
index 0de408c7..b51a282d 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -40,6 +40,9 @@
#include "uxa.h"
int uxa_screen_index;
+#ifndef SERVER_1_5
+static int uxa_generation;
+#endif
/**
* uxa_get_drawable_pixmap() returns a backing pixmap for a given drawable.
@@ -367,12 +370,18 @@ uxa_close_screen(int i, ScreenPtr pScreen)
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
#endif
+#ifdef SERVER_1_5
uxa_glyphs_fini(pScreen);
+#endif
pScreen->CreateGC = uxa_screen->SavedCreateGC;
pScreen->CloseScreen = uxa_screen->SavedCloseScreen;
pScreen->GetImage = uxa_screen->SavedGetImage;
pScreen->GetSpans = uxa_screen->SavedGetSpans;
+#ifndef SERVER_1_5
+ pScreen->PaintWindowBackground = uxa_screen->SavedPaintWindowBackground;
+ pScreen->PaintWindowBorder = uxa_screen->SavedPaintWindowBorder;
+#endif
pScreen->CreatePixmap = uxa_screen->SavedCreatePixmap;
pScreen->DestroyPixmap = uxa_screen->SavedDestroyPixmap;
pScreen->CopyWindow = uxa_screen->SavedCopyWindow;
@@ -469,7 +478,15 @@ uxa_driver_init(ScreenPtr screen, uxa_driver_t *uxa_driver)
uxa_screen->info = uxa_driver;
+#ifdef SERVER_1_5
dixSetPrivate(&screen->devPrivates, &uxa_screen_index, uxa_screen);
+#else
+ if (uxa_generation != serverGeneration) {
+ uxa_screen_index = AllocateScreenPrivateIndex();
+ uxa_generation = serverGeneration;
+ }
+ screen->devPrivates[uxa_screen_index].ptr = uxa_screen;
+#endif
// exaDDXDriverInit(screen);
@@ -488,6 +505,14 @@ uxa_driver_init(ScreenPtr screen, uxa_driver_t *uxa_driver)
uxa_screen->SavedGetSpans = screen->GetSpans;
screen->GetSpans = uxa_check_get_spans;
+#ifndef SERVER_1_5
+ uxa_screen->SavedPaintWindowBackground = screen->PaintWindowBackground;
+ screen->PaintWindowBackground = uxa_paint_window;
+
+ uxa_screen->SavedPaintWindowBorder = screen->PaintWindowBorder;
+ screen->PaintWindowBorder = uxa_paint_window;
+#endif /* !SERVER_1_5 */
+
uxa_screen->SavedCopyWindow = screen->CopyWindow;
screen->CopyWindow = uxa_copy_window;
@@ -505,9 +530,11 @@ uxa_driver_init(ScreenPtr screen, uxa_driver_t *uxa_driver)
uxa_screen->SavedComposite = ps->Composite;
ps->Composite = uxa_composite;
+#ifdef SERVER_1_5
uxa_screen->SavedGlyphs = ps->Glyphs;
ps->Glyphs = uxa_glyphs;
-
+#endif
+
uxa_screen->SavedTriangles = ps->Triangles;
ps->Triangles = uxa_triangles;
@@ -527,7 +554,9 @@ uxa_driver_init(ScreenPtr screen, uxa_driver_t *uxa_driver)
ShmRegisterFuncs(screen, &uxa_shm_funcs);
#endif
+#ifdef SERVER_1_5
uxa_glyphs_init(screen);
+#endif
LogMessage(X_INFO, "UXA(%d): Driver registered support for the following"
" operations:\n", screen->myNum);