summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-02-27 10:09:44 +1000
committerJeremy Huddleston <jeremyhu@apple.com>2012-03-30 14:44:18 -0700
commita8c9a93c66edce893af3ba460d728fe2bc48c2af (patch)
tree46788191e99673402ce6ee9019975df05a16cb99
parentbc8dc7183b50800470080eaa9c04cfd6ecc3591b (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> (cherry picked from commit eb84c154ed38194c32651727b6dfe2d1bde4c599)
-rw-r--r--dix/getevents.c6
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