mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 09:30:12 +01:00
dix: when scaling from desktop coord, take the total desktop size (#51904)
Scaled is already in desktop coordinates, take the total width into account,
not just the current screen's width.
Fixes Xdmx pointer position calculation.
X.Org Bug 51904 <http://bugs.freedesktop.org/show_bug.cgi?id=51904>
Signed-off-by: Sybren van Elderen <sowmestno@msn.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit a191dbfe85)
This commit is contained in:
parent
fa6cbd099f
commit
79f5430ba6
1 changed files with 2 additions and 2 deletions
|
|
@ -844,14 +844,14 @@ scale_from_screen(DeviceIntPtr dev, ValuatorMask *mask)
|
|||
scaled = valuator_mask_get_double(mask, 0) + scr->x;
|
||||
scaled = rescaleValuatorAxis(scaled,
|
||||
NULL, dev->valuator->axes + 0,
|
||||
0, scr->width);
|
||||
screenInfo.x, screenInfo.width);
|
||||
valuator_mask_set_double(mask, 0, scaled);
|
||||
}
|
||||
if (valuator_mask_isset(mask, 1)) {
|
||||
scaled = valuator_mask_get_double(mask, 1) + scr->y;
|
||||
scaled = rescaleValuatorAxis(scaled,
|
||||
NULL, dev->valuator->axes + 1,
|
||||
0, scr->height);
|
||||
screenInfo.y, screenInfo.height);
|
||||
valuator_mask_set_double(mask, 1, scaled);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue