[PATCH RESEND 3/4] xfree86: set mask for valuators 0/1 when emulating core events (#30267)

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 14 19:02:58 PDT 2010


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 at 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 at who-t.net>
Tested-by: Andrew Randrianasulu <randrik at mail.ru>
Tested-by: Andy Furniss
---
 hw/xfree86/common/xf86DGA.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index c468c60..1058a46 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);
 	}
     }
-- 
1.7.2.3



More information about the xorg-devel mailing list