]> git.eshelyaron.com Git - emacs.git/commitdiff
After fixing several bugs, the code works now for watching a single directory.
authorEli Zaretskii <eliz@gnu.org>
Sun, 7 Oct 2012 12:34:33 +0000 (14:34 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 7 Oct 2012 12:34:33 +0000 (14:34 +0200)
Need to remove debug code.
Also need to add w32notify.c.

src/keyboard.c
src/w32fns.c
src/w32term.c

index 6597ebd884b5caf017dd1bd8bbb96b2ddca4b3d8..ad0c5db0fc3bf359feea3800239a18e162864289 100644 (file)
@@ -3961,9 +3961,9 @@ kbd_buffer_get_event (KBOARD **kbp,
        {
          /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK).  */
          obj = Fcons (Qfile_notify,
-                      list2 (list3 (event->code,
+                      list2 (list3 (make_number (event->code),
                                     XCAR (event->arg),
-                                    CAR_SAFE (XCDR (event->arg))),
+                                    XCDR (event->arg)),
                              event->frame_or_window));
          kbd_fetch_ptr = event + 1;
        }
@@ -12179,7 +12179,7 @@ keys_of_keyboard (void)
   initial_define_lispy_key (Vspecial_event_map, "language-change",
                            "ignore");
   initial_define_lispy_key (Vspecial_event_map, "file-notify",
-                           "w32notify-handlde-event");
+                           "w32notify-handle-event");
 #endif
 }
 
index 6d5d68223540c9ef0155c422c6ea05f6f43ffc84..2d36da3b56ba1c409609c52f64965e866662f9eb 100644 (file)
@@ -2259,6 +2259,8 @@ w32_msg_pump (deferred_msg * msg_buf)
 
   while ((w32_unicode_gui ? GetMessageW : GetMessageA) (&msg, NULL, 0, 0))
     {
+      if (msg.message == WM_EMACS_FILENOTIFY)
+       DebPrint (("w32_msg_pump: File notification, hwnd = 0x%p\n", msg.hwnd));
       if (msg.hwnd == NULL)
        {
          switch (msg.message)
@@ -3807,6 +3809,10 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
        return retval;
       }
+    case WM_EMACS_FILENOTIFY:
+      DebPrint (("w32_wnd_proc: File notification arrived, posting\n"));
+      my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
+      return 1;
 
     default:
       /* Check for messages registered at runtime. */
index 951ce9ef2df5e5a5c6133b32b20731cf86e56717..1c32383098fe05029494c0ba1c0af1e529c72ef9 100644 (file)
@@ -4945,6 +4945,7 @@ w32_read_socket (struct terminal *terminal,
          break;
 
        case WM_EMACS_FILENOTIFY:
+         DebPrint (("w32_read_socket: File notification arrived\n"));
          f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
          if (f)
            queue_notifications (&inev, &msg, f, &count);