Commit d884121b authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Tested and fixed conversion of a descriptor (pointer) to event code.

parent 0b86d359
......@@ -624,7 +624,7 @@ handle_file_notifications (struct input_event *hold_quit)
Lisp_Object action = lispy_file_action (fni->Action);
inev.kind = FILE_NOTIFY_EVENT;
inev.code = (ptrdiff_t)notifications_desc;
inev.code = (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc));
inev.timestamp = GetTickCount ();
inev.modifiers = 0;
inev.frame_or_window = callback;
......
......@@ -600,8 +600,9 @@ w32_get_watch_object (void *desc)
{
Lisp_Object descriptor = XIL ((EMACS_INT)desc);
/* This is called from the input queue handling code, so we cannot
possibly QUIT if watch_list is not in the right condition. */
/* This is called from the input queue handling code, inside a
critical section, so we cannot possibly QUIT if watch_list is not
in the right condition. */
return NILP (watch_list) ? Qnil : assoc_no_quit (descriptor, watch_list);
}
......
......@@ -3305,7 +3305,8 @@ queue_notifications (struct input_event *event, W32Msg *msg, struct frame *f,
Lisp_Object action = lispy_file_action (fni->Action);
event->kind = FILE_NOTIFY_EVENT;
event->code = (ptrdiff_t)notifications_desc;
event->code
= (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc));
event->timestamp = msg->msg.time;
event->modifiers = 0;
event->frame_or_window = callback;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment