[PATCH] dix: when rescaling from master, rescale from desktop dimensions (#46657)
Chase Douglas
chase.douglas at canonical.com
Wed Feb 29 12:34:31 PST 2012
On 02/26/2012 04:18 PM, Peter Hutterer wrote:
> master->last.valuators[] is in desktop dimensions, so use those as
> rescale axis ranges, not the screen. Otherwise, a rescale on any screen
> not the top-left will cause out-of-bounds coordinates which will always
> map to the bottom-right screen, causing the device to be stuck on that
> screen.
>
> X.Org Bug 46657<http://bugs.freedesktop.org/show_bug.cgi?id=46657>
>
> Signed-off-by: Peter Hutterer<peter.hutterer at who-t.net>
> ---
> dix/getevents.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/dix/getevents.c b/dix/getevents.c
> index 306d0ff..11c509c 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -341,14 +341,16 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
> pDev->last.valuators[0] = rescaleValuatorAxis(pDev->last.valuators[0],
> NULL,
> pDev->valuator->axes + 0,
> - 0, scr->width);
> + screenInfo.x,
> + screenInfo.width);
> }
> if(pDev->valuator->numAxes> 1)
> {
> pDev->last.valuators[1] = rescaleValuatorAxis(pDev->last.valuators[1],
> NULL,
> pDev->valuator->axes + 1,
> - 0, scr->height);
> + screenInfo.y,
> + screenInfo.height);
> }
>
> /* calculate the other axis as well based on info from the old
Seems right to me.
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
More information about the xorg-devel
mailing list