Module Name:    src
Committed By:   mlelstv
Date:           Fri Jul 19 04:48:13 UTC 2024

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

Log Message:
hw.synaptics.aux_mid_button_scroll translates vertical movements
of an aux device (like a trackpoint) into a scroll event when
the middle mouse button is pressed.

Make this work with either the middle mouse button of the main
device (buttonmask 0x02) or the middle mouse button of the aux
device (buttonmask 0x40).

Fixes PR 58435.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 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.83 src/sys/dev/pckbport/synaptics.c:1.84
--- src/sys/dev/pckbport/synaptics.c:1.83	Thu Apr 18 17:35:53 2024
+++ src/sys/dev/pckbport/synaptics.c	Fri Jul 19 04:48:13 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.83 2024/04/18 17:35:53 mlelstv Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.84 2024/07/19 04:48:13 mlelstv 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.83 2024/04/18 17:35:53 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.84 2024/07/19 04:48:13 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1701,7 +1701,7 @@ pms_synaptics_passthrough(struct pms_sof
 		 * scrolling.
 		 */
 		if (synaptics_aux_mid_button_scroll &&
-		    dy && (psc->buttons & 0x2)) {
+		    dy && (psc->buttons & 0x42)) {
 			wsmouse_precision_scroll(psc->sc_wsmousedev, dx, dy);
 		} else {
 			buttons = (psc->buttons & 0x1f) | ((psc->buttons >> 5) & 0x7);

Reply via email to