mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-02 07:58:14 +02:00
libinput: add hold to get base event
LIBINPUT_EVENT_GESTURE_HOLD_BEGIN and LIBINPUT_EVENT_GESTURE_HOLD_END were missing from libinput_event_gesture_get_base_event. Add them to avoid triggering an erroneous client bug warning. Fix #671 Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
parent
ceda09e87b
commit
f0d3761f73
2 changed files with 7 additions and 2 deletions
|
|
@ -3567,7 +3567,9 @@ libinput_event_gesture_get_base_event(struct libinput_event_gesture *event)
|
|||
LIBINPUT_EVENT_GESTURE_SWIPE_END,
|
||||
LIBINPUT_EVENT_GESTURE_PINCH_BEGIN,
|
||||
LIBINPUT_EVENT_GESTURE_PINCH_UPDATE,
|
||||
LIBINPUT_EVENT_GESTURE_PINCH_END);
|
||||
LIBINPUT_EVENT_GESTURE_PINCH_END,
|
||||
LIBINPUT_EVENT_GESTURE_HOLD_BEGIN,
|
||||
LIBINPUT_EVENT_GESTURE_HOLD_END);
|
||||
|
||||
return &event->base;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,6 +366,9 @@ START_TEST(event_conversion_gesture)
|
|||
|
||||
litest_touch_down(dev, 0, 70, 30);
|
||||
litest_touch_down(dev, 1, 30, 70);
|
||||
libinput_dispatch(li);
|
||||
litest_timeout_gesture_hold();
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
litest_push_event_frame(dev);
|
||||
litest_touch_move(dev, 0, 70 - i * 5, 30 + i * 5);
|
||||
|
|
@ -379,7 +382,7 @@ START_TEST(event_conversion_gesture)
|
|||
type = libinput_event_get_type(event);
|
||||
|
||||
if (type >= LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN &&
|
||||
type <= LIBINPUT_EVENT_GESTURE_PINCH_END) {
|
||||
type <= LIBINPUT_EVENT_GESTURE_HOLD_END) {
|
||||
struct libinput_event_gesture *g;
|
||||
struct libinput_event *base;
|
||||
g = libinput_event_get_gesture_event(event);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue