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>
This commit is contained in:
Peter Hutterer 2010-06-29 15:24:51 +10:00
parent 69ac909878
commit 339f62b1bf

View File

@ -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;