[PATCH] dmx: queue button events with valid valuators

Peter Hutterer peter.hutterer at who-t.net
Wed Oct 23 07:26:25 CEST 2013


Setting POINTER_SCREEN with a unset valuator mask causes a jump to 0/0.
Alternative implementation here would be to remove the POINTER_SCREEN flag,
but that's likely more confusing to the casual reader.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/dmx/input/dmxevents.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c
index 2875620..3fd6348 100644
--- a/hw/dmx/input/dmxevents.c
+++ b/hw/dmx/input/dmxevents.c
@@ -725,7 +725,9 @@ dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
     case ButtonPress:
     case ButtonRelease:
         detail = dmxGetButtonMapping(dmxLocal, detail);
-        valuator_mask_zero(&mask);
+        valuators[0] = e->xbutton.x;
+        valuators[1] = e->xbutton.y;
+        valuator_mask_set_range(&mask, 0, 2, valuators);
         QueuePointerEvents(p, type, detail,
                            POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
         return;
-- 
1.8.3.1



More information about the xorg-devel mailing list