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

After fixing several bugs, the code works now for watching a single directory.

Need to remove debug code.
Also need to add w32notify.c.
parent 477f1e50
......@@ -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
}
......
......@@ -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. */
......
......@@ -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);
......
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