From: Peter Hutterer Date: Tue, 18 Feb 2014 22:45:57 +0000 (+1000) Subject: evdev: set CLOCK_MONOTONIC as the time source X-Git-Tag: 0.1.0~7^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84c4f40f25e91ff6ecd35b47398d13ac3996f101;p=platform%2Fupstream%2Flibinput.git 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 --- diff --git a/src/evdev.c b/src/evdev.c index 88254cc6..cb49f22e 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -31,6 +31,7 @@ #include #include #include +#include #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;