int ret;
msg->FindInt32 ("raw_char", &raw);
msg->FindInt32 ("key", &key);
+ msg->FindInt64 ("when", &rq.time);
rq.modifiers = 0;
uint32_t mods = modifiers ();
rq.just_exited_p = transit == B_EXITED_VIEW;
rq.x = point.x;
rq.y = point.y;
- rq.be_code = transit;
rq.window = this->Window ();
+ rq.time = system_time ();
if (ToolTip ())
ToolTip ()->SetMouseRelativeLocation (BPoint (-(point.x - tt_absl_pos.x),
SetMouseEventMask (B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS);
+ rq.time = system_time ();
haiku_write (BUTTON_DOWN, &rq);
}
if (!buttons)
SetMouseEventMask (0, 0);
+ rq.time = system_time ();
haiku_write (BUTTON_UP, &rq);
}
};
#include <math.h>
+#include <kernel/OS.h>
+
enum haiku_cursor
{
CURSOR_ID_NO_CURSOR = 12,
int modifiers;
unsigned keysym;
uint32_t multibyte_char;
+
+ /* Time the keypress occurred, in microseconds. */
+ bigtime_t time;
};
struct haiku_activation_event
bool just_exited_p;
int x;
int y;
- uint32_t be_code;
+ bigtime_t time;
};
struct haiku_button_event
int modifiers;
int x;
int y;
+ bigtime_t time;
};
struct haiku_iconification_event
inev.kind = inev.code > 127 ? MULTIBYTE_CHAR_KEYSTROKE_EVENT :
ASCII_KEYSTROKE_EVENT;
+ inev.timestamp = b->time / 1000;
inev.modifiers = haiku_modifiers_to_emacs (b->modifiers);
XSETFRAME (inev.frame_or_window, f);
break;
Lisp_Object frame;
XSETFRAME (frame, f);
- x_display_list->last_mouse_movement_time = system_time () / 1000;
+ x_display_list->last_mouse_movement_time = b->time / 1000;
button_or_motion_p = 1;
if (hlinfo->mouse_face_hidden)
inev.modifiers = haiku_modifiers_to_emacs (b->modifiers);
x_display_list->last_mouse_glyph_frame = 0;
- x_display_list->last_mouse_movement_time = system_time () / 1000;
+ x_display_list->last_mouse_movement_time = b->time / 1000;
button_or_motion_p = 1;
/* Is this in the tab-bar? */
if (inev.kind != NO_EVENT)
{
- if (inev.kind != HELP_EVENT)
+ if (inev.kind != HELP_EVENT && !inev.timestamp)
inev.timestamp = (button_or_motion_p
? x_display_list->last_mouse_movement_time
: system_time () / 1000);
if (inev2.kind != NO_EVENT)
{
- if (inev2.kind != HELP_EVENT)
+ if (inev2.kind != HELP_EVENT && !inev.timestamp)
inev2.timestamp = (button_or_motion_p
? x_display_list->last_mouse_movement_time
: system_time () / 1000);