1
0
Fork 0

clutter/evdev: Avoid losing key repeat timestamp resolution

Commit 9214d5029c 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
This commit is contained in:
Rui Matos 2016-11-24 18:17:22 +01:00
parent 6fa8238ebf
commit 73524cadd4

View file

@ -186,15 +186,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);