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
f77beeb981
commit
3de191e6b0
@ -457,19 +457,19 @@ process_key(struct touchpad_dispatch *touchpad,
|
|||||||
touchpad->reset = 1;
|
touchpad->reset = 1;
|
||||||
break;
|
break;
|
||||||
case BTN_TOOL_FINGER:
|
case BTN_TOOL_FINGER:
|
||||||
touchpad->finger_state =
|
touchpad->finger_state &= ~TOUCHPAD_FINGERS_ONE;
|
||||||
~TOUCHPAD_FINGERS_ONE | e->value ?
|
if (e->value)
|
||||||
TOUCHPAD_FINGERS_ONE : 0;
|
touchpad->finger_state |= TOUCHPAD_FINGERS_ONE;
|
||||||
break;
|
break;
|
||||||
case BTN_TOOL_DOUBLETAP:
|
case BTN_TOOL_DOUBLETAP:
|
||||||
touchpad->finger_state =
|
touchpad->finger_state &= ~TOUCHPAD_FINGERS_TWO;
|
||||||
~TOUCHPAD_FINGERS_TWO | e->value ?
|
if (e->value)
|
||||||
TOUCHPAD_FINGERS_TWO : 0;
|
touchpad->finger_state |= TOUCHPAD_FINGERS_TWO;
|
||||||
break;
|
break;
|
||||||
case BTN_TOOL_TRIPLETAP:
|
case BTN_TOOL_TRIPLETAP:
|
||||||
touchpad->finger_state =
|
touchpad->finger_state &= ~TOUCHPAD_FINGERS_THREE;
|
||||||
~TOUCHPAD_FINGERS_THREE | e->value ?
|
if (e->value)
|
||||||
TOUCHPAD_FINGERS_THREE : 0;
|
touchpad->finger_state |= TOUCHPAD_FINGERS_THREE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user