summaryrefslogtreecommitdiff
path: root/driver/xf86-input-synaptics
diff options
context:
space:
mode:
authorAlexandr Shadchin <shadchin@cvs.openbsd.org>2011-07-17 13:53:01 +0000
committerAlexandr Shadchin <shadchin@cvs.openbsd.org>2011-07-17 13:53:01 +0000
commit7dfeaf2d218d6d8404ff3e77d21e9c6260eb63ed (patch)
tree640f33644d3b7096e13280bc6129e0f31228962d /driver/xf86-input-synaptics
parent7f5d549c394a406152e3120d9a3724064feacb30 (diff)
fix bug "lock up" touchpad ( not allowing to move the pointer, or click )
ok matthieu@
Diffstat (limited to 'driver/xf86-input-synaptics')
-rw-r--r--driver/xf86-input-synaptics/src/wsconscomm.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/driver/xf86-input-synaptics/src/wsconscomm.c b/driver/xf86-input-synaptics/src/wsconscomm.c
index a439dacc8..e76b2dd1d 100644
--- a/driver/xf86-input-synaptics/src/wsconscomm.c
+++ b/driver/xf86-input-synaptics/src/wsconscomm.c
@@ -35,6 +35,7 @@ extern int priv_open_device(const char *);
#endif
#define DEFAULT_WSMOUSE0_DEV "/dev/wsmouse0"
+#define NEVENTS 64
static const char *synaptics_devs[] = {
DEFAULT_WSMOUSE0_DEV,
@@ -90,6 +91,8 @@ WSConsDeviceOffHook(InputInfoPtr pInfo)
static Bool
WSConsQueryHardware(InputInfoPtr pInfo)
{
+ SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
+ struct CommData *comm = &priv->comm;
int wsmouse_type;
if (ioctl(pInfo->fd, WSMOUSEIO_GTYPE, &wsmouse_type) == -1) {
@@ -97,10 +100,16 @@ WSConsQueryHardware(InputInfoPtr pInfo)
return FALSE;
}
- if (wsmouse_type == WSMOUSE_TYPE_SYNAPTICS)
- return TRUE;
+ if (wsmouse_type != WSMOUSE_TYPE_SYNAPTICS)
+ return FALSE;
- return FALSE;
+ if (comm->buffer)
+ XisbFree(comm->buffer);
+ comm->buffer = XisbNew(pInfo->fd, sizeof(struct wscons_event) * NEVENTS);
+ if (comm->buffer == NULL)
+ return FALSE;
+
+ return TRUE;
}
static Bool