mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 09:00:42 -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
f8fd02d6ee
commit
2166a496fe
@ -185,15 +185,13 @@ keyboard_repeat (gpointer data)
|
|||||||
{
|
{
|
||||||
ClutterSeatEvdev *seat = data;
|
ClutterSeatEvdev *seat = data;
|
||||||
GSource *source;
|
GSource *source;
|
||||||
guint32 time_ms;
|
|
||||||
|
|
||||||
g_return_val_if_fail (seat->repeat_device != NULL, G_SOURCE_REMOVE);
|
g_return_val_if_fail (seat->repeat_device != NULL, G_SOURCE_REMOVE);
|
||||||
source = g_main_context_find_source_by_id (NULL, seat->repeat_timer);
|
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,
|
clutter_seat_evdev_notify_key (seat,
|
||||||
seat->repeat_device,
|
seat->repeat_device,
|
||||||
ms2us (time_ms),
|
g_source_get_time (source),
|
||||||
seat->repeat_key,
|
seat->repeat_key,
|
||||||
AUTOREPEAT_VALUE,
|
AUTOREPEAT_VALUE,
|
||||||
FALSE);
|
FALSE);
|
||||||
|
Loading…
Reference in New Issue
Block a user