mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 00:00:28 +01:00
touchpad: change motion history to typesafe coords
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
f5a0a381cb
commit
dd3a2ea7d9
2 changed files with 2 additions and 7 deletions
|
|
@ -46,7 +46,7 @@ tp_hysteresis(int in, int center, int margin)
|
|||
return center + diff + margin;
|
||||
}
|
||||
|
||||
static inline struct tp_motion *
|
||||
static inline struct device_coords *
|
||||
tp_motion_history_offset(struct tp_touch *t, int offset)
|
||||
{
|
||||
int offset_index =
|
||||
|
|
|
|||
|
|
@ -122,11 +122,6 @@ enum tp_edge_scroll_touch_state {
|
|||
EDGE_SCROLL_TOUCH_STATE_AREA,
|
||||
};
|
||||
|
||||
struct tp_motion {
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
};
|
||||
|
||||
struct tp_touch {
|
||||
struct tp_dispatch *tp;
|
||||
enum touch_state state;
|
||||
|
|
@ -137,7 +132,7 @@ struct tp_touch {
|
|||
uint64_t millis;
|
||||
|
||||
struct {
|
||||
struct tp_motion samples[TOUCHPAD_HISTORY_LENGTH];
|
||||
struct device_coords samples[TOUCHPAD_HISTORY_LENGTH];
|
||||
unsigned int index;
|
||||
unsigned int count;
|
||||
} history;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue