mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
mi: return the screen from miPointerSetPosition
miPointerSetPosition may switch screens. Always return the screen the sprite is on instead of relying on callers to call miPointerGetScreen(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
@@ -833,8 +833,7 @@ positionSprite(DeviceIntPtr dev, int mode, ValuatorMask *mask,
|
||||
* screenx back into device co-ordinates. */
|
||||
isx = trunc(*screenx);
|
||||
isy = trunc(*screeny);
|
||||
miPointerSetPosition(dev, mode, &isx, &isy);
|
||||
scr = miPointerGetScreen(dev);
|
||||
scr = miPointerSetPosition(dev, mode, &isx, &isy);
|
||||
if (isx != trunc(*screenx))
|
||||
{
|
||||
*screenx -= trunc(*screenx) - isx;
|
||||
|
||||
Reference in New Issue
Block a user