This patch replicates the behaviour for button events. Only generate a
PointerKeys motion event on the master device, not on the slave device.
Fixes the current issue of PointerKey motion events generating key events as
well.

Signed-off-by: Peter Hutterer <[email protected]>
---
 xkb/xkbActions.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index b4b8395..49d7b3d 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -500,9 +500,6 @@ _XkbFilterPointerMove(      XkbSrvInfoPtr   xkbi,
 int    x,y;
 Bool   accel;
 
-    if (xkbi->device == inputInfo.keyboard)
-        return 0;
-
     if (filter->keycode==0) {          /* initial press */
        filter->keycode = keycode;
        filter->active = 1;
@@ -1342,10 +1339,12 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned 
flags,int x,int y)
     DeviceIntPtr        ptr;
     int                 gpe_flags = 0;
 
-    if (!dev->u.master)
+    if (IsMaster(dev))
+        ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER));
+    else if (!dev->u.master)
         ptr = dev;
     else
-        ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER));
+        return;
 
     if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY)
         gpe_flags = POINTER_ABSOLUTE;
-- 
1.7.1

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to