Mercurial > emacs
comparison src/keyboard.c @ 3104:3c6fccdf8257
(swallow_events): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 25 May 1993 23:19:45 +0000 |
parents | 9de5bf724302 |
children | 05c3ef28bb6b |
comparison
equal
deleted
inserted
replaced
3103:98505a819898 | 3104:3c6fccdf8257 |
---|---|
1965 #endif | 1965 #endif |
1966 | 1966 |
1967 return (obj); | 1967 return (obj); |
1968 } | 1968 } |
1969 | 1969 |
1970 /* Process any events that are not user-visible. */ | |
1971 | |
1972 void | |
1973 swallow_events () | |
1974 { | |
1975 while (kbd_fetch_ptr != kbd_store_ptr) | |
1976 { | |
1977 struct input_event *event; | |
1978 | |
1979 event = ((kbd_fetch_ptr < kbd_buffer + KBD_BUFFER_SIZE) | |
1980 ? kbd_fetch_ptr | |
1981 : kbd_buffer); | |
1982 | |
1983 last_event_timestamp = event->timestamp; | |
1984 | |
1985 /* These two kinds of events get special handling | |
1986 and don't actually appear to the command loop. */ | |
1987 if (event->kind == selection_request_event) | |
1988 { | |
1989 #ifdef HAVE_X11 | |
1990 x_handle_selection_request (event); | |
1991 kbd_fetch_ptr = event + 1; | |
1992 #else | |
1993 /* We're getting selection request events, but we don't have | |
1994 a window system. */ | |
1995 abort (); | |
1996 #endif | |
1997 } | |
1998 | |
1999 else if (event->kind == selection_clear_event) | |
2000 { | |
2001 #ifdef HAVE_X11 | |
2002 x_handle_selection_clear (event); | |
2003 kbd_fetch_ptr = event + 1; | |
2004 #else | |
2005 /* We're getting selection request events, but we don't have | |
2006 a window system. */ | |
2007 abort (); | |
2008 #endif | |
2009 } | |
2010 else | |
2011 break; | |
2012 } | |
2013 | |
2014 get_input_pending (&input_pending); | |
2015 } | |
1970 | 2016 |
1971 /* Caches for modify_event_symbol. */ | 2017 /* Caches for modify_event_symbol. */ |
1972 static Lisp_Object func_key_syms; | 2018 static Lisp_Object func_key_syms; |
1973 static Lisp_Object mouse_syms; | 2019 static Lisp_Object mouse_syms; |
1974 | 2020 |