From 2166a496fec3bc19a6b3cc34e7271041637d1d42 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Thu, 24 Nov 2016 18:17:22 +0100 Subject: clutter/evdev: Avoid losing key repeat timestamp resolution Commit 9214d5029c630e6ed8fd9793f6bcb0a0ae451576 changed the notify* API to use microseconds and we already have a microsecond time source here so we can use the timestamp directly without losing resolution at this layer. https://bugzilla.gnome.org/show_bug.cgi?id=774989 --- clutter/clutter/evdev/clutter-seat-evdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clutter/clutter/evdev/clutter-seat-evdev.c b/clutter/clutter/evdev/clutter-seat-evdev.c index f5ae1dd46..2fc040bb6 100644 --- a/clutter/clutter/evdev/clutter-seat-evdev.c +++ b/clutter/clutter/evdev/clutter-seat-evdev.c @@ -185,15 +185,13 @@ keyboard_repeat (gpointer data) { ClutterSeatEvdev *seat = data; GSource *source; - guint32 time_ms; g_return_val_if_fail (seat->repeat_device != NULL, G_SOURCE_REMOVE); source = g_main_context_find_source_by_id (NULL, seat->repeat_timer); - time_ms = g_source_get_time (source) / 1000; clutter_seat_evdev_notify_key (seat, seat->repeat_device, - ms2us (time_ms), + g_source_get_time (source), seat->repeat_key, AUTOREPEAT_VALUE, FALSE); -- cgit v1.2.1