mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 05:40:05 +01:00
Don't try to send BTN_TOOL events for zero fingers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
6ccee710bd
commit
27aaba81d5
1 changed files with 2 additions and 2 deletions
|
|
@ -780,7 +780,7 @@ terminate_slots(struct libevdev *dev,
|
|||
* sync event frame sync_key_state() sets everything correctly
|
||||
* for the *real* number of touches.
|
||||
*/
|
||||
if (ntouches_before <= 5) {
|
||||
if (ntouches_before > 0 && ntouches_before <= 5) {
|
||||
struct input_event ev = {
|
||||
.type = EV_KEY,
|
||||
.code = map[ntouches_before - 1],
|
||||
|
|
@ -790,7 +790,7 @@ terminate_slots(struct libevdev *dev,
|
|||
update_key_state(dev, &ev);
|
||||
}
|
||||
|
||||
if (ntouches_after <= 5) {
|
||||
if (ntouches_after > 0 && ntouches_after <= 5) {
|
||||
struct input_event ev = {
|
||||
.type = EV_KEY,
|
||||
.code = map[ntouches_after - 1],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue