diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-02-27 10:09:44 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-03-22 11:33:20 +1000 |
commit | eb84c154ed38194c32651727b6dfe2d1bde4c599 (patch) | |
tree | 0b7918a492e8bc8343ab9806ed2a73c17e3cff41 /dix/getevents.c | |
parent | 6b6afd3d013e3f4910fae3520d1d786df2b0e47a (diff) |
dix: when rescaling from master, rescale from desktop dimensions (#46657)
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@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'dix/getevents.c')
-rw-r--r-- | dix/getevents.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dix/getevents.c b/dix/getevents.c index 2f6f06ced..68bf58c13 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -345,13 +345,15 @@ 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 |