mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-26 06:20:12 +01:00
read-only mirror of https://gitlab.freedesktop.org/libinput/libinput
We store timestamps in ms since system boot (CLOCK_MONOTONIC). This will wrap after circa 50 days. I've considered making our code wrapping safe, but that won't work. We also use our internal timestamps to program timer-fds for timeouts. And we store ms in a single integer but the kernel uses 2 integers, one for seconds and one for usec/nanosec. So at 32 bits our ms containing integer will wrap in 50 days, while the kernels seconds storing integer lasts a lot longer. So when we wrap our ms timestamps, we will be programming the timer-fds with a seconds value in the past. So change all our internal timestamps to uint64_t to avoid the wrapping when programming the timer-fds. Note that we move from 64-bit timestamps to 32-bit timestamps when calling the foo_notify_bar functions from libinput-private.h. Having 64 bit timestamps has no use past this point, since the wayland input protocol uses 32 bit timestamps (and clients will have to deal with wrapping). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> |
||
|---|---|---|
| doc | ||
| m4 | ||
| src | ||
| test | ||
| tools | ||
| .gitignore | ||
| autogen.sh | ||
| configure.ac | ||
| COPYING | ||
| Makefile.am | ||
| README | ||
libinput libinput is a library that handles input devices for display servers and other applications that need to directly deal with input devices. It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code the user of libinput need to provide the common set of functionality that users expect. Input event processing includes scaling touch coordinates, generating pointer events from touchpads, pointer acceleration, etc. libinput originates from weston, the Wayland reference compositor. The source code of libinput can be found at: http://cgit.freedesktop.org/wayland/libinput For more information, visit: http://www.freedesktop.org/wiki/Software/libinput/