mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 16:20:05 +01:00
touchpad: always init the left/right palm edge to INT_MIN/MAX
A touchpad without resolution support had the values set to 0, disabling pointer movement. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
e82728ca27
commit
fc320c1dd1
1 changed files with 4 additions and 4 deletions
|
|
@ -754,6 +754,9 @@ tp_init_palmdetect(struct tp_dispatch *tp,
|
|||
{
|
||||
int width;
|
||||
|
||||
tp->palm.right_edge = INT_MAX;
|
||||
tp->palm.left_edge = INT_MIN;
|
||||
|
||||
/* We don't know how big the touchpad is */
|
||||
if (device->abs.absinfo_x->resolution == 1)
|
||||
return 0;
|
||||
|
|
@ -763,11 +766,8 @@ tp_init_palmdetect(struct tp_dispatch *tp,
|
|||
|
||||
/* Enable palm detection on touchpads >= 80 mm. Anything smaller
|
||||
probably won't need it, until we find out it does */
|
||||
if (width/device->abs.absinfo_x->resolution < 80) {
|
||||
tp->palm.right_edge = INT_MAX;
|
||||
tp->palm.left_edge = INT_MIN;
|
||||
if (width/device->abs.absinfo_x->resolution < 80)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* palm edges are 5% of the width on each side */
|
||||
tp->palm.right_edge = device->abs.absinfo_x->maximum - width * 0.05;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue