[PATCH video-sis] Update for XInput ABI changes to miPointerSetPosition

Peter Hutterer peter.hutterer at who-t.net
Wed Sep 18 18:48:55 PDT 2013


On Wed, Sep 18, 2013 at 08:46:01PM -0400, Gaetan Nadon wrote:
> Satisfy the new function parameters by indicating that no barrier
> events were generated.
> 
> Changes introduced in xserver commit:
> 21a15f9a04ec0a6c8f654eef943561e98db2475d,
> "Pass the event list through to the pointer barrier code to return it"
> 
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
>  src/sis_driver.c |   10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/src/sis_driver.c b/src/sis_driver.c
> index cefe503..cfd34ad 100644
> --- a/src/sis_driver.c
> +++ b/src/sis_driver.c
> @@ -9378,7 +9378,15 @@ SISMergedPointerMoved(SCRN_ARG_TYPE arg, int x, int y)
>       }
>       if(doit) {
>  	sigstate = xf86BlockSIGIO();
> -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 15
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 19
> +        {
> +            double dx = x, dy = y;
> +            int nevents = 0;       /* no generated barrier events */
> +            miPointerSetPosition(inputInfo.pointer, Absolute, &dx, &dy, &nevents, NULL);

not quite, sorry. nevents is an return value, we pass this down because
miPointerSetPosition may actually add events to the list. this must be an
actual event list, the code here would likely segfault if there are barriers
(see input_constrain_cursor).

Cheers,
   Peter

> +            x = (int)dx;
> +            y = (int)dy;
> +        }
> +#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 15
>          {
>              double dx = x, dy = y;
>              miPointerSetPosition(inputInfo.pointer, Absolute, &dx, &dy);
> -- 
> 1.7.9.5
> 


More information about the xorg-devel mailing list