mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-05 03:10:13 +01:00
evdev: set CLOCK_MONOTONIC as the time source
Avoids erroneous timestamps when the system time is reset. This used to a be a problem with the X.Org synaptics driver where taps, scrolling and a couple of other things would potentially lock up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
0fea6226f1
commit
84c4f40f25
1 changed files with 3 additions and 0 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <mtdev-plumbing.h>
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "libinput.h"
|
||||
#include "evdev.h"
|
||||
|
|
@ -640,6 +641,8 @@ evdev_device_create(struct libinput_seat *seat,
|
|||
if (rc != 0)
|
||||
return NULL;
|
||||
|
||||
libevdev_set_clock_id(device->evdev, CLOCK_MONOTONIC);
|
||||
|
||||
device->seat_caps = 0;
|
||||
device->is_mt = 0;
|
||||
device->mtdev = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue