| author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-09 03:46:20 (GMT) |
|---|---|---|
| committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-12 01:44:10 (GMT) |
| commit | 56efbc0986e782da45addb05ece9f456d41d7a90 (patch) (side-by-side diff) | |
| tree | 33e405c1685b8e2c75f26c98f57dc9b216fab921 | |
| parent | 67710ad1d172cc4d53e28e5cc7dab2efb57a9a85 (diff) | |
| download | xserver-56efbc0986e782da45addb05ece9f456d41d7a90.zip xserver-56efbc0986e782da45addb05ece9f456d41d7a90.tar.gz | |
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 <http://bugs.freedesktop.org/show_bug.cgi?id=19285>
| -rw-r--r-- | dix/getevents.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dix/getevents.c b/dix/getevents.c index 1189d0b..acc8a4f 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -720,6 +720,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; } /** @@ -1006,9 +1009,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, positionSprite(pDev, &x, &y, scr, &cx, &cy); 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) |
