Allow direct access to event streams for faster updates
When using GtkEventControllerLegacy
, events are only fired on each frame where the framerate is itself tied to the framerate of the compositor.
However, this limits its usefulness for devices that have much faster poll rates and where having this info in advance would allow for decreased lag.
In particular, pen inputs have much faster poll rates than screens (sometimes in the 250 Hz range) so that
- if you want to have all of the information, you need to look at the history of the event (only looking at the event's position is not enough because you loose at least half the information)
- but if you do so it will be slower because you need to process 2-4 events (4 if 240 Hz pulling rate on a 60 Hz setting) on the screen's refresh instead of processing all events but the last one. There may also be cases where having this information in advance means you're ready to render to the screen before the refresh (if all previous events are processed and no new one happens before a refresh).