mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
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:
parent
6fa8238ebf
commit
73524cadd4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user