mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-05 05:10:26 +01:00
touchpad: add an enabled toggle to the hysteresis
Hardcoded to 'enabled' right now No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c498c8c60b
commit
8b923d371e
2 changed files with 5 additions and 0 deletions
|
|
@ -138,6 +138,9 @@ tp_motion_hysteresis(struct tp_dispatch *tp,
|
|||
int x = t->point.x,
|
||||
y = t->point.y;
|
||||
|
||||
if (!tp->hysteresis.enabled)
|
||||
return;
|
||||
|
||||
if (t->history.count == 0) {
|
||||
t->hysteresis_center = t->point;
|
||||
} else {
|
||||
|
|
@ -2901,6 +2904,7 @@ tp_init_hysteresis(struct tp_dispatch *tp)
|
|||
res_y = tp->device->abs.absinfo_y->resolution;
|
||||
tp->hysteresis.margin.x = res_x/2;
|
||||
tp->hysteresis.margin.y = res_y/2;
|
||||
tp->hysteresis.enabled = true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -270,6 +270,7 @@ struct tp_dispatch {
|
|||
} touch_size;
|
||||
|
||||
struct {
|
||||
bool enabled;
|
||||
struct device_coords margin;
|
||||
} hysteresis;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue