diff options
authorPeter Hutterer <>2010-10-28 16:13:09 +1000
committerPeter Hutterer <>2010-10-29 08:28:57 +1000
commitfe8d122b133a43125cc961d2c3c811fa776f29c8 (patch)
parenta210068c5222acbdb04db17cb8cef314735bf977 (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 <> Reported-by: Erik Kilfoil <> Reviewed-by: Peter Hutterer <> Signed-off-by: Peter Hutterer <>
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;
dev->use = IsXExtensionDevice;