Patch to fix wireless keyboard/mouse detection in libXi (xinput1)

Peter Hutterer peter.hutterer at who-t.net
Wed Oct 27 23:21:09 PDT 2010


On Wed, Oct 27, 2010 at 09:27:37PM -0700, eric wrote:
> Attached is a patch that corrects a problem when using a wireless USB
> mouse/keyboard combination.  The USB wireless device ends up listing both
> the keyboard and the mouse as a keyboard device.  This prevents proper
> detection of the device type.
> 
> There is more information in the Xorg bugzilla here:
> http://bugs.freedesktop.org/show_bug.cgi?id=29045
> 
> And a bit more information can be found on the Ubuntu bug tracker here:
> https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/575465
> 
> Please let me know if you have any questions.
> 
> Thanks,
> 
> Eric Kilfoil

> diff --git a/Xi/listdev.c b/Xi/listdev.c
> index 3b2272b..b38fbd1 100644
> --- a/Xi/listdev.c
> +++ b/Xi/listdev.c
> @@ -180,10 +180,10 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes,
>  	dev->use = IsXKeyboard;
>      else if (IsMaster(d) && IsPointerDevice(d))
>  	dev->use = IsXPointer;
> -    else if (d->key && d->kbdfeed)
> -        dev->use = IsXExtensionKeyboard;
>      else if (d->valuator && d->button)
>          dev->use = IsXExtensionPointer;
> +    else if (d->key && d->kbdfeed)
> +        dev->use = IsXExtensionKeyboard;
>      else
>  	dev->use = IsXExtensionDevice;
>  

merged, thanks.

please use git format-patch next time for the patch generation, it makes 
life for maintainers _a lot_ easier.

Cheers,
  Peter


More information about the xorg-devel mailing list