mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-22 21:30:44 +01:00
test: fix pad_button_ignored test to not trigger the proximity timeout
Once we start working with real event frames (i.e. intervals after SYN_REPORT) we'll always trigger the proximity timeout here. Avoid this by sending one event with all buttons. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
3b97de9a43
commit
74f4491f17
1 changed files with 9 additions and 5 deletions
|
|
@ -2226,13 +2226,17 @@ START_TEST(pad_buttons_ignored)
|
|||
litest_tablet_proximity_in(dev, 10, 10, axes);
|
||||
litest_drain_events(li);
|
||||
|
||||
for (button = BTN_0; button < BTN_MOUSE; button++) {
|
||||
for (button = BTN_0; button < BTN_MOUSE; button++)
|
||||
litest_event(dev, EV_KEY, button, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
libinput_dispatch(li);
|
||||
|
||||
for (button = BTN_0; button < BTN_MOUSE; button++)
|
||||
litest_event(dev, EV_KEY, button, 0);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
libinput_dispatch(li);
|
||||
}
|
||||
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
libinput_dispatch(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue