timer: flush the timer funcs if our events come in late
Avoid processing an event with a time later than the earliest timer expiry. If libinput_dispatch() isn't called frequently enough, we may have e.g. a tap timeout happening but read a subsequent input event first. In that case we can erroneously trigger or miss out on taps, see wrong palm detection, etc. Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com>
Showing
- src/evdev.c 1 addition, 0 deletionssrc/evdev.c
- src/libinput-private.h 1 addition, 0 deletionssrc/libinput-private.h
- src/timer.c 45 additions, 17 deletionssrc/timer.c
- src/timer.h 3 additions, 0 deletionssrc/timer.h
- test/litest.c 14 additions, 0 deletionstest/litest.c
- test/litest.h 4 additions, 0 deletionstest/litest.h
- test/test-misc.c 73 additions, 0 deletionstest/test-misc.c
Loading
Please register or sign in to comment