diff options
-rw-r--r-- | src/intel_dri.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c index 90f9b8fe..1227dbb0 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -71,7 +71,11 @@ typedef struct { PixmapPtr pixmap; } I830DRI2BufferPrivateRec, *I830DRI2BufferPrivatePtr; +#if HAS_DEVPRIVATEKEYREC static DevPrivateKeyRec i830_client_key; +#else +static int i830_client_key; +#endif static uint32_t pixmap_flink(PixmapPtr pixmap) { @@ -705,7 +709,11 @@ i830_dri2_register_frame_event_resource_types(void) static XID get_client_id(ClientPtr client) { +#if HAS_DIXREGISTERPRIVATEKEY XID *ptr = dixGetPrivateAddr(&client->devPrivates, &i830_client_key); +#else + XID *ptr = dixLookupPrivate(&client->devPrivates, &i830_client_key); +#endif if (*ptr == 0) *ptr = FakeClientID(client->index); return *ptr; @@ -1480,8 +1488,13 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) return FALSE; } +#if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey(&i830_client_key, PRIVATE_CLIENT, sizeof(XID))) return FALSE; +#else + if (!dixRequestPrivate(&i830_client_key, sizeof(XID))) + return FALSE; +#endif #if DRI2INFOREC_VERSION >= 4 |