aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2012-10-07 14:34:33 +0200
committerEli Zaretskii2012-10-07 14:34:33 +0200
commitae7565592486ecb484970e7cfaba508f047e7e03 (patch)
treeca82fa631f4cb0713cbd1c6085bb754a03d20fec /src
parent477f1e504482847a3b1209bc0a1dccfded649370 (diff)
downloademacs-ae7565592486ecb484970e7cfaba508f047e7e03.tar.gz
emacs-ae7565592486ecb484970e7cfaba508f047e7e03.zip
After fixing several bugs, the code works now for watching a single directory.
Need to remove debug code. Also need to add w32notify.c.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c6
-rw-r--r--src/w32fns.c6
-rw-r--r--src/w32term.c1
3 files changed, 10 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 6597ebd884b..ad0c5db0fc3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3961,9 +3961,9 @@ kbd_buffer_get_event (KBOARD **kbp,
3961 { 3961 {
3962 /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */ 3962 /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */
3963 obj = Fcons (Qfile_notify, 3963 obj = Fcons (Qfile_notify,
3964 list2 (list3 (event->code, 3964 list2 (list3 (make_number (event->code),
3965 XCAR (event->arg), 3965 XCAR (event->arg),
3966 CAR_SAFE (XCDR (event->arg))), 3966 XCDR (event->arg)),
3967 event->frame_or_window)); 3967 event->frame_or_window));
3968 kbd_fetch_ptr = event + 1; 3968 kbd_fetch_ptr = event + 1;
3969 } 3969 }
@@ -12179,7 +12179,7 @@ keys_of_keyboard (void)
12179 initial_define_lispy_key (Vspecial_event_map, "language-change", 12179 initial_define_lispy_key (Vspecial_event_map, "language-change",
12180 "ignore"); 12180 "ignore");
12181 initial_define_lispy_key (Vspecial_event_map, "file-notify", 12181 initial_define_lispy_key (Vspecial_event_map, "file-notify",
12182 "w32notify-handlde-event"); 12182 "w32notify-handle-event");
12183#endif 12183#endif
12184} 12184}
12185 12185
diff --git a/src/w32fns.c b/src/w32fns.c
index 6d5d6822354..2d36da3b56b 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2259,6 +2259,8 @@ w32_msg_pump (deferred_msg * msg_buf)
2259 2259
2260 while ((w32_unicode_gui ? GetMessageW : GetMessageA) (&msg, NULL, 0, 0)) 2260 while ((w32_unicode_gui ? GetMessageW : GetMessageA) (&msg, NULL, 0, 0))
2261 { 2261 {
2262 if (msg.message == WM_EMACS_FILENOTIFY)
2263 DebPrint (("w32_msg_pump: File notification, hwnd = 0x%p\n", msg.hwnd));
2262 if (msg.hwnd == NULL) 2264 if (msg.hwnd == NULL)
2263 { 2265 {
2264 switch (msg.message) 2266 switch (msg.message)
@@ -3807,6 +3809,10 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
3807 3809
3808 return retval; 3810 return retval;
3809 } 3811 }
3812 case WM_EMACS_FILENOTIFY:
3813 DebPrint (("w32_wnd_proc: File notification arrived, posting\n"));
3814 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3815 return 1;
3810 3816
3811 default: 3817 default:
3812 /* Check for messages registered at runtime. */ 3818 /* Check for messages registered at runtime. */
diff --git a/src/w32term.c b/src/w32term.c
index 951ce9ef2df..1c32383098f 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4945,6 +4945,7 @@ w32_read_socket (struct terminal *terminal,
4945 break; 4945 break;
4946 4946
4947 case WM_EMACS_FILENOTIFY: 4947 case WM_EMACS_FILENOTIFY:
4948 DebPrint (("w32_read_socket: File notification arrived\n"));
4948 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 4949 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
4949 if (f) 4950 if (f)
4950 queue_notifications (&inev, &msg, f, &count); 4951 queue_notifications (&inev, &msg, f, &count);