Module Name:    src
Committed By:   nia
Date:           Sun Mar 15 22:44:32 UTC 2020

Modified Files:
        src/sys/dev/pckbport: synaptics.c

Log Message:
synaptics: Check for single-finger event jitter in all cases.

I now have smooth two-finger scrolling.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pckbport/synaptics.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/pckbport/synaptics.c
diff -u src/sys/dev/pckbport/synaptics.c:1.60 src/sys/dev/pckbport/synaptics.c:1.61
--- src/sys/dev/pckbport/synaptics.c:1.60	Sat Mar 14 22:23:17 2020
+++ src/sys/dev/pckbport/synaptics.c	Sun Mar 15 22:44:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.60 2020/03/14 22:23:17 nia Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.61 2020/03/15 22:44:32 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.60 2020/03/14 22:23:17 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.61 2020/03/15 22:44:32 nia Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1295,19 +1295,12 @@ synaptics_finger_detect(struct synaptics
 			fingers = 3;
 			break;
 
-		case SYNAPTICS_WIDTH_PEN:
-			fingers = 1;
-			break;
-
 		default:
 			/*
 			 * The width value can report spurious single-finger
 			 * events after a multi-finger event.
 			 */
-			if (sc->prev_fingers > 1)
-				fingers = sc->prev_fingers;
-			else
-				fingers = 1;
+			fingers = sc->prev_fingers <= 1 ? 1 : sc->prev_fingers;
 			break;
 		}
 	}

Reply via email to