diff options
Diffstat (limited to 'src/gx_randr.c')
-rw-r--r-- | src/gx_randr.c | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/src/gx_randr.c b/src/gx_randr.c index c0ca3b9..48f7ce4 100644 --- a/src/gx_randr.c +++ b/src/gx_randr.c @@ -59,22 +59,11 @@ typedef struct _GXRandRInfo { Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; -#if HAS_DEVPRIVATEKEYREC static DevPrivateKeyRec GXRandRIndex; -#else -static int GXRandRIndex; -#endif - -#define OLD_VIDEODRV_INTERFACE (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) -#if OLD_VIDEODRV_INTERFACE -#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[GXRandRIndex].ptr) -#define XF86RANDRSET(p, v) (p)->devPrivates[GXRandRIndex].ptr = v -#else #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ dixLookupPrivate(&(p)->devPrivates, &GXRandRIndex)) #define XF86RANDRSET(p, v) dixSetPrivate(&(p)->devPrivates, &GXRandRIndex, v) -#endif static int GXRandRModeRefresh(DisplayModePtr mode) @@ -168,11 +157,7 @@ GXRandRSetMode(ScreenPtr pScreen, int oldmmWidth = pScreen->mmWidth; int oldmmHeight = pScreen->mmHeight; -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 8 - WindowPtr pRoot = WindowTable[pScreen->myNum]; -#else WindowPtr pRoot = pScreen->root; -#endif DisplayModePtr currentMode = NULL; Bool ret = TRUE; @@ -181,8 +166,7 @@ GXRandRSetMode(ScreenPtr pScreen, #endif if (pRoot) - (*pScrni-> - EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, FALSE)); + (*pScrni->EnableDisableFBAccess) (pScrni, FALSE); if (useVirtual) { pScrni->virtualX = pRandr->virtualX; @@ -237,8 +221,7 @@ GXRandRSetMode(ScreenPtr pScreen, xf86SetViewport(pScreen, 0, 0); if (pRoot) - (*pScrni-> - EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, TRUE)); + (*pScrni->EnableDisableFBAccess) (pScrni, TRUE); return ret; } @@ -264,11 +247,7 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, } /* FIXME: we don't have a new video ABI yet */ -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 miPointerGetPosition(inputInfo.pointer, &px, &py); -#else - miPointerPosition(&px, &py); -#endif for (mode = pScrni->modes;; mode = mode->next) { if (pRandr->maxX == 0 || pRandr->maxY == 0) { @@ -308,11 +287,7 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, } /* FIXME: we don't have a new video ABI yet */ -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 if (pScreen == miPointerGetScreen(inputInfo.pointer)) -#else - if (pScreen == miPointerCurrentScreen()) -#endif { px = (px >= pScreen->width ? (pScreen->width - 1) : px); py = (py >= pScreen->height ? (pScreen->height - 1) : py); @@ -320,11 +295,7 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, xf86SetViewport(pScreen, px, py); /* FIXME: we don't have a new video ABI yet */ - (*pScreen->SetCursorPosition) ( -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 - inputInfo.pointer, -#endif - pScreen, px, py, FALSE); + (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, px, py, FALSE); } return TRUE; @@ -347,13 +318,8 @@ GXRandRInit(ScreenPtr pScreen, int rotation) if (GXRandRGeneration != serverGeneration) { GXRandRGeneration = serverGeneration; } -#if OLD_VIDEODRV_INTERFACE - GXRandRIndex = AllocateScreenPrivateIndex(); -#endif -#if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey(&GXRandRIndex, PRIVATE_SCREEN, 0)) return FALSE; -#endif pRandr = calloc(1, sizeof(XF86RandRInfoRec)); if (pRandr == NULL) |