touchpad: move hysteresis margin into its own struct

No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2017-10-26 13:20:01 +10:00
parent e66cf8def1
commit c498c8c60b
2 changed files with 7 additions and 5 deletions

View file

@ -143,10 +143,10 @@ tp_motion_hysteresis(struct tp_dispatch *tp,
} else {
x = evdev_hysteresis(x,
t->hysteresis_center.x,
tp->hysteresis_margin.x);
tp->hysteresis.margin.x);
y = evdev_hysteresis(y,
t->hysteresis_center.y,
tp->hysteresis_margin.y);
tp->hysteresis.margin.y);
t->hysteresis_center.x = x;
t->hysteresis_center.y = y;
t->point.x = x;
@ -2899,8 +2899,8 @@ tp_init_hysteresis(struct tp_dispatch *tp)
res_x = tp->device->abs.absinfo_x->resolution;
res_y = tp->device->abs.absinfo_y->resolution;
tp->hysteresis_margin.x = res_x/2;
tp->hysteresis_margin.y = res_y/2;
tp->hysteresis.margin.x = res_x/2;
tp->hysteresis.margin.y = res_y/2;
}
static void

View file

@ -269,7 +269,9 @@ struct tp_dispatch {
double orientation_to_angle;
} touch_size;
struct device_coords hysteresis_margin;
struct {
struct device_coords margin;
} hysteresis;
struct {
double x_scale_coeff;