From 41dd825acf4c3d28f89e74a902c64091dcc40037 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 9 Jan 2009 13:46:20 +1000 Subject: [PATCH] dix: drop x/y back into last.valuators before updating the history (#19285) positionSprite needs to scale to screen coordinates and in the process of doing so alters dev->last.valuators[0:1]. Drop the real coordinates back after finishing and before updating the motion history. This way, we don't push the screen coordinates into the motion history. X.Org Bug 19285 --- dix/getevents.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 96cf2f5..ee1b5cd 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -722,6 +722,9 @@ positionSprite(DeviceIntPtr dev, int *x, int *y, dev->valuator->axes + 1, scr->height); } + /* dropy x/y (device coordinates) back into valuators for next event */ + dev->last.valuators[0] = *x; + dev->last.valuators[1] = *y; } /** @@ -1008,9 +1011,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, positionSprite(pDev, &x, &y, scr, &cx, &cy, flags & POINTER_SCREEN); updateHistory(pDev, first_valuator, num_valuators, ms); - /* dropy x/y (device coordinates) back into valuators for next event */ - pDev->last.valuators[0] = x; - pDev->last.valuators[1] = y; /* Update the valuators with the true value sent to the client*/ if (num_valuators >= 1 && first_valuator == 0) -- 1.6.0.6