mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 12:18:15 +02:00
evdev-touchpad: Twiddle finger_state correctly
The original code always set the finger_state to the appropriate bitmask irrespective of whether the event was a press or a release. It would also blat all members of the bitmask rather than ORing in the new bit for the event. Cc:Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Rob Bradford <rob@linux.intel.com>
This commit is contained in:
parent
c69e1fbe27
commit
56b178cc00
1 changed files with 9 additions and 9 deletions
|
|
@ -457,19 +457,19 @@ process_key(struct touchpad_dispatch *touchpad,
|
|||
touchpad->reset = 1;
|
||||
break;
|
||||
case BTN_TOOL_FINGER:
|
||||
touchpad->finger_state =
|
||||
~TOUCHPAD_FINGERS_ONE | e->value ?
|
||||
TOUCHPAD_FINGERS_ONE : 0;
|
||||
touchpad->finger_state &= ~TOUCHPAD_FINGERS_ONE;
|
||||
if (e->value)
|
||||
touchpad->finger_state |= TOUCHPAD_FINGERS_ONE;
|
||||
break;
|
||||
case BTN_TOOL_DOUBLETAP:
|
||||
touchpad->finger_state =
|
||||
~TOUCHPAD_FINGERS_TWO | e->value ?
|
||||
TOUCHPAD_FINGERS_TWO : 0;
|
||||
touchpad->finger_state &= ~TOUCHPAD_FINGERS_TWO;
|
||||
if (e->value)
|
||||
touchpad->finger_state |= TOUCHPAD_FINGERS_TWO;
|
||||
break;
|
||||
case BTN_TOOL_TRIPLETAP:
|
||||
touchpad->finger_state =
|
||||
~TOUCHPAD_FINGERS_THREE | e->value ?
|
||||
TOUCHPAD_FINGERS_THREE : 0;
|
||||
touchpad->finger_state &= ~TOUCHPAD_FINGERS_THREE;
|
||||
if (e->value)
|
||||
touchpad->finger_state |= TOUCHPAD_FINGERS_THREE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue