diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-10-28 16:13:09 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-10-29 08:28:57 +1000 |
commit | fe8d122b133a43125cc961d2c3c811fa776f29c8 (patch) | |
tree | a7e30df07aa1385756bd08126a925379960346d0 | |
parent | a210068c5222acbdb04db17cb8cef314735bf977 (diff) |
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>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | Xi/listdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Xi/listdev.c b/Xi/listdev.c index 3b2272bc3..b38fbd1c0 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; |