Summary: | Handle timeouts before events after that timeout | ||
---|---|---|---|
Product: | Wayland | Reporter: | Peter Hutterer <peter.hutterer> |
Component: | libinput | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | peter.hutterer |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Peter Hutterer
2015-05-22 04:45:42 UTC
Dump of some notes: the two functions that matter here are evdev_device_dispatch() and libinput_timer_handler(). libinput_dispatch() would need to call into all sources with a get_timestamp(), that can return the next time to process events from that source. Put that into an ordered list, then start processing the sources according to that timestamp. For timers we only have one event to process, but devices can have more than one event waiting. So ideally pass the timestamp for the _next_ device in the list into dispatch(). That way evdev_device_dispatch() can return the current event timestamp whenever that exceeds the other device's timestamp value, and be re-ordered into the list. This does require us to store the event though, libevdev doesn't have a peek event function, so we have to copy it into our struct, with the usual "valid" marker flags. Quick testing shows that this doesn't seem to really be an issue in real-world usage though the tests hit this quite easily. closing as wontfix, this is a lot of effort just for the benefit of the tests. In real-world usage if the timeouts are hit before the event is processed something is going way too slow and we'll run into a bunch of other issues anyway. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.