summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-10-13 10:31:51 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-11-10 11:14:46 +1000
commitb144c0f4c72977671a39fa6368cbfea142444096 (patch)
tree20d72927c30fd30750af12012279f9368302b8de /hw
parent79f2a58c323bd1ad373f1f929207b5af98031b95 (diff)
xfree86: set mask for valuators 0/1 when emulating core events (#30267)
EventToCore as of the commit below won't generate core motion events if the valuator mask for x/y isn't set. For DGA, we work around this check by forcibly setting the mask in the event we pass down. commit de8be07cc0a8163b6ef04455706fd5ca2cebe587 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 17 12:08:52 2010 +1000 dix: don't create core motion events for non-x/y valuators. X.Org Bug 30267 <http://bugs.freedesktop.org/show_bug.cgi?id=30267> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Andrew Randrianasulu <randrik@mail.ru> Tested-by: Andy Furniss Reviewed-by: Daniel Stone <daniel@fooishbar.org> (cherry picked from commit 9872e0f0115cd7d0543e55a1831facddf3aff90c)
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86DGA.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index c468c6038..1058a466c 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -1133,6 +1133,10 @@ DGAProcessPointerEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr mouse)
ev.root_x = event->dx;
ev.root_y = event->dy;
ev.corestate = event->state;
+ /* DGA is core only, so valuators.data doesn't actually matter.
+ * Mask must be set for EventToCore to create motion events. */
+ SetBit(ev.valuators.mask, 0);
+ SetBit(ev.valuators.mask, 1);
DeliverGrabbedEvent ((InternalEvent*)&ev, mouse, FALSE);
}
}