Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/dev/pckbport Pull up following revision(s) (requested...
details: https://anonhg.NetBSD.org/src/rev/f529509fffbc
branches: netbsd-9
changeset: 931659:f529509fffbc
user: martin <martin%NetBSD.org@localhost>
date: Tue Apr 28 16:22:15 2020 +0000
description:
Pull up following revision(s) (requested by jmcneill in ticket #863):
sys/dev/pckbport/synaptics.c: revision 1.65
sys/dev/pckbport/synapticsvar.h: revision 1.10
Extended buttons are reported separate from touchpad buttons, so track
button press / release state separate from touch events.
diffstat:
sys/dev/pckbport/synaptics.c | 31 ++++++++++++++++++++++++-------
sys/dev/pckbport/synapticsvar.h | 8 +++++++-
2 files changed, 31 insertions(+), 8 deletions(-)
diffs (89 lines):
diff -r c5bb1fb83f97 -r f529509fffbc sys/dev/pckbport/synaptics.c
--- a/sys/dev/pckbport/synaptics.c Tue Apr 28 16:15:34 2020 +0000
+++ b/sys/dev/pckbport/synaptics.c Tue Apr 28 16:22:15 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: synaptics.c,v 1.50.2.3 2020/04/02 19:23:41 martin Exp $ */
+/* $NetBSD: synaptics.c,v 1.50.2.4 2020/04/28 16:22:15 martin 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.50.2.3 2020/04/02 19:23:41 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.50.2.4 2020/04/28 16:22:15 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1009,19 +1009,29 @@
psc->packet[3], psc->packet[4], psc->packet[5]);
if ((psc->packet[4] & SYN_1BUTMASK) != 0)
- sp.sp_left = PMS_LBUTMASK;
+ sc->ext_left = PMS_LBUTMASK;
+ else
+ sc->ext_left = 0;
if ((psc->packet[4] & SYN_3BUTMASK) != 0)
- sp.sp_middle = PMS_MBUTMASK;
+ sc->ext_middle = PMS_MBUTMASK;
+ else
+ sc->ext_middle = 0;
if ((psc->packet[5] & SYN_2BUTMASK) != 0)
- sp.sp_right = PMS_RBUTMASK;
+ sc->ext_right = PMS_RBUTMASK;
+ else
+ sc->ext_right = 0;
if ((psc->packet[5] & SYN_4BUTMASK) != 0)
- sp.sp_up = 1;
+ sc->ext_up = 1;
+ else
+ sc->ext_up = 0;
if ((psc->packet[4] & SYN_5BUTMASK) != 0)
- sp.sp_down = 1;
+ sc->ext_down = 1;
+ else
+ sc->ext_down = 0;
} else {
/* Left/Right button handling. */
sp.sp_left = psc->packet[0] & PMS_LBUTMASK;
@@ -1101,6 +1111,13 @@
sp.sp_middle = 0;
}
+ /* Overlay extended button state */
+ sp.sp_left |= sc->ext_left;
+ sp.sp_right |= sc->ext_right;
+ sp.sp_middle |= sc->ext_middle;
+ sp.sp_up |= sc->ext_up;
+ sp.sp_down |= sc->ext_down;
+
switch (synaptics_up_down_emul) {
case 1:
/* Do middle button emulation using up/down buttons */
diff -r c5bb1fb83f97 -r f529509fffbc sys/dev/pckbport/synapticsvar.h
--- a/sys/dev/pckbport/synapticsvar.h Tue Apr 28 16:15:34 2020 +0000
+++ b/sys/dev/pckbport/synapticsvar.h Tue Apr 28 16:22:15 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: synapticsvar.h,v 1.9 2019/06/02 08:55:00 blymn Exp $ */
+/* $NetBSD: synapticsvar.h,v 1.9.2.1 2020/04/28 16:22:15 martin Exp $ */
/*
* Copyright (c) 2005, Steve C. Woodford
@@ -89,6 +89,12 @@
int history_x[SYN_MAX_FINGERS][SYN_HIST_SIZE];
int history_y[SYN_MAX_FINGERS][SYN_HIST_SIZE];
int history_z[SYN_MAX_FINGERS][SYN_HIST_SIZE];
+
+ char ext_left;
+ char ext_right;
+ char ext_middle;
+ char ext_up;
+ char ext_down;
};
int pms_synaptics_probe_init(void *vsc);
Home |
Main Index |
Thread Index |
Old Index