Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pckbport synaptics: Revert changes that broke gestur...
details: https://anonhg.NetBSD.org/src/rev/8bd0ab818777
branches: trunk
changeset: 970544:8bd0ab818777
user: nia <nia%NetBSD.org@localhost>
date: Fri Mar 27 11:10:07 2020 +0000
description:
synaptics: Revert changes that broke gestures in cases where they worked.
It seems I have to figure out another way to make scrolling work for me.
diffstat:
sys/dev/pckbport/synaptics.c | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diffs (61 lines):
diff -r 9206e102d4a6 -r 8bd0ab818777 sys/dev/pckbport/synaptics.c
--- a/sys/dev/pckbport/synaptics.c Fri Mar 27 09:47:03 2020 +0000
+++ b/sys/dev/pckbport/synaptics.c Fri Mar 27 11:10:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: synaptics.c,v 1.62 2020/03/16 11:13:19 nia Exp $ */
+/* $NetBSD: synaptics.c,v 1.63 2020/03/27 11:10:07 nia Exp $ */
/*
* Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
#include "opt_pms.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.62 2020/03/16 11:13:19 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.63 2020/03/27 11:10:07 nia Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -115,10 +115,10 @@
static int synaptics_two_fingers_emul = 0;
static int synaptics_scale_x = 16;
static int synaptics_scale_y = 16;
-static int synaptics_scale_z = 64;
+static int synaptics_scale_z = 32;
static int synaptics_max_speed_x = 32;
static int synaptics_max_speed_y = 32;
-static int synaptics_max_speed_z = 1;
+static int synaptics_max_speed_z = 2;
static int synaptics_movement_threshold = 4;
static int synaptics_fscroll_min = 13;
static int synaptics_fscroll_max = 14;
@@ -1285,7 +1285,13 @@
return (0);
}
- if (sc->flags & SYN_FLAG_HAS_MULTI_FINGER) {
+ /*
+ * Detect 2 and 3 fingers if supported, but only if multiple
+ * fingers appear within the tap gesture time period.
+ */
+ if (sc->flags & SYN_FLAG_HAS_MULTI_FINGER &&
+ SYN_TIME(sc, sc->gesture_start_packet,
+ sp->sp_finger) < synaptics_gesture_length) {
switch (sp->sp_w) {
case SYNAPTICS_WIDTH_TWO_FINGERS:
fingers = 2;
@@ -1732,14 +1738,6 @@
synaptics_movement(sc, sp, sp->sp_finger,
z_emul, &dx, &dy, &dz);
- } else if (fingers > 1) {
- /*
- * Multiple finger movement. Interpret it as scrolling.
- */
- synaptics_movement(sc, sp, sp->sp_finger, 1,
- &dx, &dy, &dz);
- sc->rem_x[0] = sc->rem_y[0] = 0;
- dx = dy = 0;
} else {
/*
* No valid finger. Therefore no movement.
Home |
Main Index |
Thread Index |
Old Index