diff options
author | Eli Zaretskii <eliz@gnu.org> | 2012-10-12 11:47:00 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2012-10-12 11:47:00 +0200 |
commit | 977c647927a5ac5916f4c737e32885f15a1a5b00 (patch) | |
tree | 2591cf0860152a69bb5e997d28eef451ea855993 /src/w32xfns.c | |
parent | 0dc9ee4adad0b566c32036a4c201a1de882ac65b (diff) |
The TTY case is resolved: notifications now work even if Emacs
doesn't have focus.
Diffstat (limited to 'src/w32xfns.c')
-rw-r--r-- | src/w32xfns.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/w32xfns.c b/src/w32xfns.c index cb45257166..8820edda6c 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -315,16 +315,22 @@ prepend_msg (W32Msg *lpmsg) return (TRUE); } -/* Process all messages in the current thread's queue. */ -void +/* Process all messages in the current thread's queue. Value is 1 if + one of these messages was WM_EMACS_FILENOTIFY, zero otherwise. */ +int drain_message_queue (void) { MSG msg; + int retval = 0; + while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) { + if (msg.message == WM_EMACS_FILENOTIFY) + retval = 1; TranslateMessage (&msg); DispatchMessage (&msg); } + return retval; } /* x_sync is a no-op on W32. */ |