[PATCH 11/12] dix: move MD last.valuator update into fill_pointer_events

Peter Hutterer peter.hutterer at who-t.net
Mon Oct 3 22:24:07 PDT 2011


Don't update the MD where it's not expected, positionSprite should really
just do that - position the sprite.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/getevents.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/dix/getevents.c b/dix/getevents.c
index 945e275..b0725aa 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -844,12 +844,6 @@ positionSprite(DeviceIntPtr dev, int mode, ValuatorMask *mask,
         y = rescaleValuatorAxis(*screeny, NULL, dev->valuator->axes + 1,
                                 scr->height);
 
-    /* Update the MD's co-ordinates, which are always in screen space. */
-    if (!IsMaster(dev) || !IsFloating(dev)) {
-        DeviceIntPtr master = GetMaster(dev, MASTER_POINTER);
-        master->last.valuators[0] = *screenx;
-        master->last.valuators[1] = *screeny;
-    }
 
     if (valuator_mask_isset(mask, 0))
         valuator_mask_set_double(mask, 0, x);
@@ -1189,6 +1183,13 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
             pDev->last.valuators[i] = valuator_mask_get_double(&mask, i);
     }
 
+    /* Update the MD's co-ordinates, which are always in screen space. */
+    if (!IsMaster(pDev) || !IsFloating(pDev)) {
+        DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER);
+        master->last.valuators[0] = screenx;
+        master->last.valuators[1] = screeny;
+    }
+
     event = &events->device_event;
     init_device_event(event, pDev, ms);
 
-- 
1.7.6.4



More information about the xorg-devel mailing list