diff --git a/src/inotify.c b/src/inotify.c index c29d940c984..456a9b22a80 100644 --- a/src/inotify.c +++ b/src/inotify.c @@ -339,6 +339,7 @@ inotify_callback (int fd, void *_) struct input_event event; EVENT_INIT (event); event.kind = FILE_NOTIFY_EVENT; + event.frame_or_window = Qnil; for (ssize_t i = 0; i < n; ) { diff --git a/src/keyboard.c b/src/keyboard.c index 5feb0fe231e..a9cbd107dde 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -7220,12 +7220,11 @@ make_lispy_event (struct input_event *event) #ifdef USE_FILE_NOTIFY case FILE_NOTIFY_EVENT: -#ifdef HAVE_W32NOTIFY /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */ - return list3 (Qfile_notify, event->arg, event->frame_or_window); -#else - return Fcons (Qfile_notify, event->arg); -#endif + if (!NILP (event->frame_or_window)) /* HAVE_W32NOTIFY */ + return list3 (Qfile_notify, event->arg, event->frame_or_window); + else + return Fcons (Qfile_notify, event->arg); #endif /* USE_FILE_NOTIFY */ case SLEEP_EVENT: