summaryrefslogtreecommitdiff
path: root/uxa/uxa.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-04-30 13:33:54 -0700
committerKeith Packard <keithp@keithp.com>2010-06-06 16:00:12 -0700
commit42ddc39430a10513c49a415ddf1a0dc5fa52089e (patch)
tree017a90e54a017bd36d74fa592eb9ff85c16255d3 /uxa/uxa.c
parent2c1fda08e889cad07acb452230da06f9c383d21c (diff)
Adapt to DevPrivate API changes
This allows the driver to be built against either the old or new DevPrivate API. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'uxa/uxa.c')
-rw-r--r--uxa/uxa.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/uxa/uxa.c b/uxa/uxa.c
index 32b007d6..cef480f7 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -39,7 +39,11 @@
#include "dixfontstr.h"
#include "uxa.h"
+#if HAS_DEVPRIVATEKEYREC
+DevPrivateKeyRec uxa_screen_index;
+#else
int uxa_screen_index;
+#endif
/**
* uxa_get_drawable_pixmap() returns a backing pixmap for a given drawable.
@@ -467,6 +471,10 @@ Bool uxa_driver_init(ScreenPtr screen, uxa_driver_t * uxa_driver)
"non-NULL\n", screen->myNum);
return FALSE;
}
+#if HAS_DIXREGISTERPRIVATEKEY
+ if (!dixRegisterPrivateKey(&uxa_screen_index, PRIVATE_SCREEN, 0))
+ return FALSE;
+#endif
uxa_screen = calloc(sizeof(uxa_screen_t), 1);
if (!uxa_screen) {