]> code.delx.au - gnu-emacs/commitdiff
Tested and fixed conversion of a descriptor (pointer) to event code.
authorEli Zaretskii <eliz@gnu.org>
Thu, 18 Oct 2012 18:00:00 +0000 (20:00 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 18 Oct 2012 18:00:00 +0000 (20:00 +0200)
src/w32inevt.c
src/w32notify.c
src/w32term.c

index 06629d37cf64849768016572719b84d00fc1450a..2cbf31efda3c481d38cc95abf95c6d9fef4526f6 100644 (file)
@@ -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;
index f14621001a8657ea0c11cf2cde22c1424a62c86e..9fcd15e7f8f1bc64fe57ac47256d85cbec2e5705 100644 (file)
@@ -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);
 }
 
index c00bbe0f3cd81d41b9740cfbc62e5bdb3630fd65..3ebd849ec3180ad55cd2d3925f2a13dba9611866 100644 (file)
@@ -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;