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:
Peter Hutterer
2011-10-03 12:49:49 +10:00
parent 88dfe5366d
commit 81cfe44b1e
3 changed files with 9 additions and 10 deletions

View File

@@ -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;