summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2016-11-24 18:17:22 +0100
committerRui Matos <tiagomatos@gmail.com>2017-01-25 13:10:14 +0100
commit2166a496fec3bc19a6b3cc34e7271041637d1d42 (patch)
treea54187e6b37fedfcf74a4910511e3a981fa2341b
parentf8fd02d6eedc2452788dd1ab0e70056152eae7c7 (diff)
downloadmutter-2166a496fec3bc19a6b3cc34e7271041637d1d42.tar.gz
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
-rw-r--r--clutter/clutter/evdev/clutter-seat-evdev.c4
1 files changed, 1 insertions, 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);