View | Details | Raw Unified | Return to bug 196624 | Differences between
and this patch

Collapse All | Expand All

(-)wsp.c (-1 / +7 lines)
Lines 87-92 Link Here
87
	int	pressure_untouch_threshold;
87
	int	pressure_untouch_threshold;
88
	int	pressure_tap_threshold;
88
	int	pressure_tap_threshold;
89
	int	scr_hor_threshold;
89
	int	scr_hor_threshold;
90
	int	one_finger_tap;
90
}
91
}
91
	wsp_tuning =
92
	wsp_tuning =
92
{
93
{
Lines 96-101 Link Here
96
	.pressure_untouch_threshold = 10,
97
	.pressure_untouch_threshold = 10,
97
	.pressure_tap_threshold = 100,
98
	.pressure_tap_threshold = 100,
98
	.scr_hor_threshold = 10,
99
	.scr_hor_threshold = 10,
100
	.one_finger_tap = 1,
99
};
101
};
100
102
101
static void
103
static void
Lines 107-112 Link Here
107
	WSP_CLAMP(ptun->pressure_untouch_threshold, 1, 255);
109
	WSP_CLAMP(ptun->pressure_untouch_threshold, 1, 255);
108
	WSP_CLAMP(ptun->pressure_tap_threshold, 1, 255);
110
	WSP_CLAMP(ptun->pressure_tap_threshold, 1, 255);
109
	WSP_CLAMP(ptun->scr_hor_threshold, 1, 255);
111
	WSP_CLAMP(ptun->scr_hor_threshold, 1, 255);
112
	WSP_CLAMP(ptun->one_finger_tap, 0, 1);
110
}
113
}
111
114
112
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RW,
115
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RW,
Lines 121-126 Link Here
121
    &wsp_tuning.pressure_tap_threshold, 0, "tap pressure threshold");
124
    &wsp_tuning.pressure_tap_threshold, 0, "tap pressure threshold");
122
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RW,
125
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RW,
123
    &wsp_tuning.scr_hor_threshold, 0, "horizontal scrolling threshold");
126
    &wsp_tuning.scr_hor_threshold, 0, "horizontal scrolling threshold");
127
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, one_finger_tap, CTLFLAG_RW,
128
    &wsp_tuning.one_finger_tap, 0, "one finger tap toggle");
124
129
125
#define	WSP_IFACE_INDEX	1
130
#define	WSP_IFACE_INDEX	1
126
131
Lines 791-797 Link Here
791
				 */
796
				 */
792
				switch (sc->ntaps) {
797
				switch (sc->ntaps) {
793
				case 1:
798
				case 1:
794
					if (!(params->caps & HAS_INTEGRATED_BUTTON)) {
799
					if (tun.one_finger_tap > 0 ||
800
					    !(params->caps & HAS_INTEGRATED_BUTTON)) {
795
						wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN);
801
						wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN);
796
						DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n");
802
						DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n");
797
					}
803
					}

Return to bug 196624