Mercurial > emacs
changeset 3104:3c6fccdf8257
(swallow_events): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 25 May 1993 23:19:45 +0000 |
parents | 98505a819898 |
children | 852789920c11 |
files | src/keyboard.c |
diffstat | 1 files changed, 46 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Tue May 25 23:19:07 1993 +0000 +++ b/src/keyboard.c Tue May 25 23:19:45 1993 +0000 @@ -1967,6 +1967,52 @@ return (obj); } +/* Process any events that are not user-visible. */ + +void +swallow_events () +{ + while (kbd_fetch_ptr != kbd_store_ptr) + { + struct input_event *event; + + event = ((kbd_fetch_ptr < kbd_buffer + KBD_BUFFER_SIZE) + ? kbd_fetch_ptr + : kbd_buffer); + + last_event_timestamp = event->timestamp; + + /* These two kinds of events get special handling + and don't actually appear to the command loop. */ + if (event->kind == selection_request_event) + { +#ifdef HAVE_X11 + x_handle_selection_request (event); + kbd_fetch_ptr = event + 1; +#else + /* We're getting selection request events, but we don't have + a window system. */ + abort (); +#endif + } + + else if (event->kind == selection_clear_event) + { +#ifdef HAVE_X11 + x_handle_selection_clear (event); + kbd_fetch_ptr = event + 1; +#else + /* We're getting selection request events, but we don't have + a window system. */ + abort (); +#endif + } + else + break; + } + + get_input_pending (&input_pending); +} /* Caches for modify_event_symbol. */ static Lisp_Object func_key_syms;