diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-10-31 15:03:21 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-01-04 13:16:38 +1000 |
commit | 16724f3ecd322c64d9ee164fb122d4285d9cef08 (patch) | |
tree | 783d7cfce8caf845f53828062519281ce2d3b04e | |
parent | 3e0d8e11927b8c68f6531eef39eb5bca557e887b (diff) |
Use miPointerSetPosition, not miPointerAbsoluteCursor
miPointerAbsoluteCursor was removed in '09.
Technically this shouldn't just work on the VCP since any master pointer may
end up in the dead area. However, I suspect the Venn diagramm of MPX users
and sis merged framebuffer users shows little overlap.
miPointerSetPosition's prototype changed a few times, these are a bunch of
untested ifdefs that should be correct according to the git history.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | src/sis_driver.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/sis_driver.c b/src/sis_driver.c index 6f7a15e..3218239 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -85,6 +85,10 @@ #include <X11/extensions/dpms.h> #endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 15 +#include <inputstr.h> /* for inputInfo */ +#endif + #ifdef XF86DRI #include "dri.h" @@ -9346,9 +9350,22 @@ SISMergedPointerMoved(int scrnIndex, int x, int y) } } if(doit) { - UpdateCurrentTime(); sigstate = xf86BlockSIGIO(); +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 15 + { + double dx = x, dy = y; + miPointerSetPosition(inputInfo.pointer, Absolute, &dx, &dy); + x = (int)dx; + y = (int)dy; + } +#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 + miPointerSetPosition(inputInfo.pointer, Absolute, x, y); +#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5 + miPointerSetPosition(inputInfo.pointer, x, y); +#else + UpdateCurrentTime(); miPointerAbsoluteCursor(x, y, currentTime.milliseconds); +#endif xf86UnblockSIGIO(sigstate); return; } |