Re: [PATCH sis] Use miPointerSetPosition, not miPointerAbsoluteCursor
Reviewed-by: Jeremy Huddleston jerem...@apple.com Sent from my iPad On Jan 3, 2012, at 19:26, Peter Hutterer peter.hutte...@who-t.net wrote: 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.hutte...@who-t.net --- I do wonder why I bothered. The way I read this is that this code would have had unresolved symbols since server 1.6 and no-one complained. 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; } -- 1.7.7.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH sis] 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.hutte...@who-t.net --- I do wonder why I bothered. The way I read this is that this code would have had unresolved symbols since server 1.6 and no-one complained. 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; } -- 1.7.7.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH sis] Use miPointerSetPosition, not miPointerAbsoluteCursor
Does this need ifdef based on some ABI version? On Oct 30, 2011, at 22:49, Peter Hutterer wrote: 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. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/sis_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/sis_driver.c b/src/sis_driver.c index 7ac9487..9f14cc7 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -9347,7 +9347,7 @@ SISMergedPointerMoved(int scrnIndex, int x, int y) if(doit) { UpdateCurrentTime(); sigstate = xf86BlockSIGIO(); - miPointerAbsoluteCursor(x, y, currentTime.milliseconds); + miPointerSetPosition(inputInfo.pointer, x, y); xf86UnblockSIGIO(sigstate); return; } -- 1.7.7 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH sis] Use miPointerSetPosition, not miPointerAbsoluteCursor
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. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/sis_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/sis_driver.c b/src/sis_driver.c index 7ac9487..9f14cc7 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -9347,7 +9347,7 @@ SISMergedPointerMoved(int scrnIndex, int x, int y) if(doit) { UpdateCurrentTime(); sigstate = xf86BlockSIGIO(); - miPointerAbsoluteCursor(x, y, currentTime.milliseconds); + miPointerSetPosition(inputInfo.pointer, x, y); xf86UnblockSIGIO(sigstate); return; } -- 1.7.7 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel