diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-05-28 11:13:54 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-05-28 11:14:59 +0930 |
commit | 739eb15da7bb0d2ca681eeb9a308b1297ee4eca7 (patch) | |
tree | b2a24c333a57a5d4c0427f2a7c06f6e9185f47b5 | |
parent | 5186a2b736e30b7d68a75f861f51047491182e57 (diff) |
Fix build for git-master (missing device pointers).
We don't have an updated Video ABI yet, so use the XINPUT ABI as check for
when to use which call.
Note that the check is not optimal. We only check for the position of the VCP,
not of any other device to adjust the viewpoint. This needs to be fixed.
-rw-r--r-- | src/gx_randr.c | 22 | ||||
-rw-r--r-- | src/lx_randr.c | 22 |
2 files changed, 40 insertions, 4 deletions
diff --git a/src/gx_randr.c b/src/gx_randr.c index 98a86f7..553fce2 100644 --- a/src/gx_randr.c +++ b/src/gx_randr.c @@ -247,7 +247,12 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, pRandr->virtualY = pScrni->virtualY; } +/* 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) { @@ -286,13 +291,26 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, return FALSE; } - if (pScreen == miPointerCurrentScreen()) { +/* 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); xf86SetViewport(pScreen, px, py); - (*pScreen->SetCursorPosition) (pScreen, px, py, FALSE); +/* 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); } return TRUE; diff --git a/src/lx_randr.c b/src/lx_randr.c index 0d2a8e5..e22466c 100644 --- a/src/lx_randr.c +++ b/src/lx_randr.c @@ -246,7 +246,12 @@ LXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, pRandr->virtualY = pScrni->virtualY; } +/* 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) { @@ -285,13 +290,26 @@ LXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, return FALSE; } - if (pScreen == miPointerCurrentScreen()) { +/* 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); xf86SetViewport(pScreen, px, py); - (*pScreen->SetCursorPosition) (pScreen, px, py, FALSE); + (*pScreen->SetCursorPosition) ( +/* FIXME: we don't have a new video ABI yet */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 3 + inputInfo.pointer, +#endif + pScreen, + px, py, + FALSE); } return TRUE; |