Bug 29045 - On some devices mouse button click fails to trigger event
Summary: On some devices mouse button click fails to trigger event
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: http://bugs.launchpad.net/ubuntu/+sou...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-07-13 10:13 UTC by Ezra Reeves
Modified: 2011-10-06 11:36 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch that was attached to Ubuntu bug (579 bytes, patch)
2010-07-13 10:13 UTC, Ezra Reeves
no flags Details | Splinter Review

Description Ezra Reeves 2010-07-13 10:13:51 UTC
Created attachment 36994 [details] [review]
patch that was attached to Ubuntu bug

As discussed in the Ubuntu bug report found here:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/575465

I did some more digging on this today, and I found that an HP branded wireless USB mouse has the same issue. With this mouse (as well as the logitech wireless mouse), the return from:

    xdev = XListInputDevices(GDK_WINDOW_XDISPLAY(rootwin), &ndevices_return);

lists the USB device twice, but both have xdev[num].use == 3 (IsXExtensionKeyboard as defined in X11/XI.h).

I think the problem is that one of those devices should have the use member set to 4. The attached xinput list provided by Locke above shows this correctly with one device as a pointer and one as a keyboard, but I'm assuming the xinput program is using the XI2 API.

With a simple little program to list the devices and print the use member:

13 devices found
Virtual core pointer: use is 0
Virtual core keyboard: use is 1
Virtual core XTEST pointer: is a pointer
Virtual core XTEST keyboard: use is 3
Power Button: use is 3
Power Button: use is 3
G15 Gaming Keyboard: use is 3
G15 Gaming Keyboard: use is 3
Logitech USB-PS/2 Optical Mouse: is a pointer
Macintosh mouse button emulation: is a pointer
G15 Extra Keys: use is 3
BTC USB Multimedia Cordless Kit: use is 3
BTC USB Multimedia Cordless Kit: use is 3

While xinput prints:

      BTC USB Multimedia Cordless Kit id=14	[slave pointer (2)]
      BTC USB Multimedia Cordless Kit id=13	[slave keyboard (3)]

Swapping the order of the test in Xi/listdev.c that determines whether a device is a pointer or a keyboard properly detects my devices (OEM USB wireless mouse/kb combo) -- one as a keyboard and one as a pointer.
Comment 1 Peter Hutterer 2010-11-02 21:06:00 UTC
in the pull request in http://lists.freedesktop.org/archives/xorg-devel/2010-October/014686.html

please close this bug when you notice the commit went in, thanks.
Comment 2 Jeremy Huddleston Sequoia 2011-10-06 11:36:40 UTC
It was committed, even though the log message refers to the wrong bug number.

commit fe8d122b133a43125cc961d2c3c811fa776f29c8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Oct 28 16:13:09 2010 +1000

    Xi: reshuffle conditions for labeling a device as IsXExtensionKeyboard 
(#29046)
    
    From the original bug reporter Ezra Reeves:
    
    "I did some more digging on this today, and I found that an HP branded
    wireless USB mouse has the same issue. With this mouse (as well as the
    logitech wireless mouse), the return from:
    
    xdev = XListInputDevices(GDK_WINDOW_XDISPLAY(rootwin), &ndevices_return);
    
    lists the USB device twice, but both have xdev[num].use == 3
    (IsXExtensionKeyboard as defined in X11/XI.h).
    
    [...]
    
    Swapping the order of the test in Xi/listdev.c that determines whether a
    device is a pointer or a keyboard properly detects my devices (OEM USB
    wireless mouse/kb combo) -- one as a keyboard and one as a pointer."
    
    X.Org Bug 29046 <http://bugs.freedesktop.org/show_bug.cgi?id=29046>
    
    Reported-by: Erik Kilfoil <ekilfoil@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.