diff options
author | Colin Harrison <colin.harrison@virgin.net> | 2012-01-04 17:16:36 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-01-04 17:24:54 +0000 |
commit | 404078f80c31e51585ed5d37ea8ed5a06585e8aa (patch) | |
tree | 1481b6128338ef0f0853d4bcf4f4ecc2acf1b4e3 | |
parent | c01417ffbd8afed07b400857ee14cd811aa64dd9 (diff) |
hw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition()
Commit 3b36fd1b49030ead44358945f62e5abe7f4609ce changed miPointerSetPosition()
to take co-ordinates as doubles, not ints. Update for that change.
Could lead to missing mouse events?
On 04/10/2011 06:09, Peter Hutterer wrote:
> Hi Jon,
>
> Just stumbled across this in the xwin ddx:
> winEnqueueMotion() in hw/xwin/winmouse.c has a comment
>
> * XXX: miPointerMove does exactly this, but is static :-( (and uses a static buffer)
>
> miPointerMove isn't static anymore now, maybe you can replace this function
> with a simple call now?
>
> Cheers,
> Peter
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r-- | hw/xwin/winmouse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c index 3193e3e51..dc84f4c4b 100644 --- a/hw/xwin/winmouse.c +++ b/hw/xwin/winmouse.c @@ -363,8 +363,10 @@ void winEnqueueMotion(int x, int y) { int valuators[2]; ValuatorMask mask; + double dx = (double)x; + double dy = (double)y; - miPointerSetPosition(g_pwinPointer, POINTER_RELATIVE, &x, &y); + miPointerSetPosition(g_pwinPointer, POINTER_RELATIVE, &dx, &dy); valuators[0] = x; valuators[1] = y; |