mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-26 19:10:06 +01:00
gestures: add a function to know if there is pending pointer motion
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
parent
2599b0d899
commit
bbc5aee5e5
1 changed files with 17 additions and 0 deletions
|
|
@ -154,6 +154,23 @@ tp_get_raw_pointer_motion(struct tp_dispatch *tp)
|
|||
return raw;
|
||||
}
|
||||
|
||||
static bool
|
||||
tp_has_pending_pointer_motion(struct tp_dispatch *tp, uint64_t time)
|
||||
{
|
||||
struct device_float_coords raw;
|
||||
|
||||
if (!(tp->queued & TOUCHPAD_EVENT_MOTION))
|
||||
return false;
|
||||
|
||||
/* Checking for raw pointer motion is enough in this case.
|
||||
* Calling tp_filter_motion is intentionally omitted to avoid calling
|
||||
* it twice (here and in tp_gesture_post_pointer_motion) with the same
|
||||
* event.
|
||||
*/
|
||||
raw = tp_get_raw_pointer_motion(tp);
|
||||
return !device_float_is_zero(raw);
|
||||
}
|
||||
|
||||
static void
|
||||
tp_gesture_post_pointer_motion(struct tp_dispatch *tp, uint64_t time)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue