diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-06-29 15:24:51 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-07-01 14:05:39 +1000 |
commit | 339f62b1bfadb0ee77d67e351f4e30f5d5e9625f (patch) | |
tree | e2bf8b46ceff0797f90f755bf3490a23af2e2ac1 /xkb | |
parent | 69ac909878ef80bb74c4a9ca4150eda66debd754 (diff) |
xkb: emulate PointerKeys events only on the master device.
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbActions.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index b4b839558..49d7b3d53 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; |