Module Name: src
Committed By: macallan
Date: Wed Aug 11 16:54:10 UTC 2010
Modified Files:
src/sys/dev/adb: adb_ms.c
Log Message:
Make the movement-while-tapping threshold smaller so moving the cursor by a
few pixels won't trigger a button event. This should probably become a sysctl
knob.
While there, remove some commented out stuff and fix a typo.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/adb/adb_ms.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/adb/adb_ms.c
diff -u src/sys/dev/adb/adb_ms.c:1.8 src/sys/dev/adb/adb_ms.c:1.9
--- src/sys/dev/adb/adb_ms.c:1.8 Wed Mar 26 18:04:15 2008
+++ src/sys/dev/adb/adb_ms.c Wed Aug 11 16:54:10 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: adb_ms.c,v 1.8 2008/03/26 18:04:15 matt Exp $ */
+/* $NetBSD: adb_ms.c,v 1.9 2010/08/11 16:54:10 macallan Exp $ */
/*
* Copyright (C) 1998 Colin Wood
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adb_ms.c,v 1.8 2008/03/26 18:04:15 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adb_ms.c,v 1.9 2010/08/11 16:54:10 macallan Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -107,7 +107,6 @@
static int adbms_match(device_t, cfdata_t, void *);
static void adbms_attach(device_t, device_t, void *);
static void ems_init(struct adbms_softc *);
-//static void ms_processevent(adb_event_t *event, struct adbms_softc *);
static void init_trackpad(struct adbms_softc *);
static void adbms_init_mouse(struct adbms_softc *);
static void adbms_init_turbo(struct adbms_softc *);
@@ -614,7 +613,7 @@
/* finger up */
if (sc->sc_down) {
if (((sc->sc_x * sc->sc_x +
- sc->sc_y * sc->sc_y) < 20) &&
+ sc->sc_y * sc->sc_y) < 3) &&
(sc->sc_wsmousedev)) {
/*
* if there wasn't much movement between
@@ -646,7 +645,7 @@
/* finger up */
if (sc->sc_down) {
if (((sc->sc_x * sc->sc_x +
- sc->sc_y * sc->sc_y) < 20) &&
+ sc->sc_y * sc->sc_y) < 3) &&
(sc->sc_wsmousedev)) {
/*
* if there wasn't much movement between
@@ -758,7 +757,7 @@
}
} else {
while ((sc->sc_msg_len == -1) && (cnt < timeout)) {
- tsleep(&sc->sc_event, 0, "adbkbdio", hz);
+ tsleep(&sc->sc_event, 0, "adbmsio", hz);
cnt++;
}
}