From: Po Lu Date: Wed, 19 Jan 2022 01:14:19 +0000 (+0000) Subject: Fix event timestamp generation on Haiku X-Git-Tag: emacs-29.0.90~2958 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d5723560d5b611d076b196b350e34190834b1c88;p=emacs.git Fix event timestamp generation on Haiku * src/haikuterm.c (haiku_read_socket): Use miliseconds for event time. --- diff --git a/src/haikuterm.c b/src/haikuterm.c index 34cd1885a80..0fa6050b478 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -2763,7 +2763,7 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) Lisp_Object frame; XSETFRAME (frame, f); - x_display_list->last_mouse_movement_time = time (NULL); + x_display_list->last_mouse_movement_time = system_time () / 1000; button_or_motion_p = 1; if (hlinfo->mouse_face_hidden) @@ -2889,7 +2889,7 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) inev.modifiers = haiku_modifiers_to_emacs (b->modifiers); x_display_list->last_mouse_glyph_frame = 0; - x_display_list->last_mouse_movement_time = time (NULL); + x_display_list->last_mouse_movement_time = system_time () / 1000; button_or_motion_p = 1; /* Is this in the tab-bar? */ @@ -3297,7 +3297,7 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) if (inev.kind != HELP_EVENT) inev.timestamp = (button_or_motion_p ? x_display_list->last_mouse_movement_time - : time (NULL)); + : system_time () / 1000); kbd_buffer_store_event_hold (&inev, hold_quit); ++message_count; } @@ -3307,7 +3307,7 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) if (inev2.kind != HELP_EVENT) inev2.timestamp = (button_or_motion_p ? x_display_list->last_mouse_movement_time - : time (NULL)); + : system_time () / 1000); kbd_buffer_store_event_hold (&inev2, hold_quit); ++message_count; }