summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-08-01 19:21:02 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-08-01 19:21:02 +0000
commit488c575b7ebcc902f137d5748d4f6dba6015f2f3 (patch)
tree0d22f47e02f9fb97d86fe6654826911d5bc8ee4e
parentdcc544d3fd76269289eb2c5ef7cc6d8024ad17ac (diff)
Fix a problem when switching back from a text VT; avoid stealing
the keyboard or other input devices events.
-rw-r--r--driver/xf86-input-usbtablet/src/usbtablet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/driver/xf86-input-usbtablet/src/usbtablet.c b/driver/xf86-input-usbtablet/src/usbtablet.c
index 225d7dc0e..7e78a7c8b 100644
--- a/driver/xf86-input-usbtablet/src/usbtablet.c
+++ b/driver/xf86-input-usbtablet/src/usbtablet.c
@@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
-/* $OpenBSD: usbtablet.c,v 1.10 2010/07/25 19:53:35 matthieu Exp $ */
+/* $OpenBSD: usbtablet.c,v 1.11 2010/08/01 19:21:01 matthieu Exp $ */
/*
* Driver for USB HID tablet devices.
@@ -504,8 +504,11 @@ UsbTabletOpen(InputInfoPtr pInfo)
DBG(1, ErrorF("opening %s\n", comm->devName));
for (dev = comm->devices[0]; dev != NULL; dev = dev->next) {
- if (dev->fd != -1 && dev != pInfo)
+ if (dev->fd != -1 && dev != pInfo
+ && strcmp(dev->type_name, XI_TABLET) == 0) {
pInfo->fd = dev->fd;
+ break;
+ }
}
if (pInfo->fd != -1) {
DBG(1, ErrorF("UsbTabletOpen: shared device already open %x\n",