Mercurial > emacs
changeset 11285:7b90c1076881
(kbd_buffer_get_event): Check for frame buried in a cons.
Delete menu_bar_event handling code.
(make_lispy_event): Move it here, so it gets a switch-frame if needed.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sat, 08 Apr 1995 00:22:33 +0000 |
parents | 0340dba1df7e |
children | 91376c3783cb |
files | src/keyboard.c |
diffstat | 1 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Sat Apr 08 00:19:28 1995 +0000 +++ b/src/keyboard.c Sat Apr 08 00:22:33 1995 +0000 @@ -2439,14 +2439,6 @@ kbd_fetch_ptr = event + 1; } #endif - else if (event->kind == menu_bar_event) - { - /* The event value is in the cdr of the frame_or_window slot. */ - if (!CONSP (event->frame_or_window)) - abort (); - obj = XCONS (event->frame_or_window)->cdr; - kbd_fetch_ptr = event + 1; - } else if (event->kind == buffer_switch_event) { /* The value doesn't matter here; only the type is tested. */ @@ -2471,7 +2463,9 @@ Lisp_Object focus; frame = event->frame_or_window; - if (WINDOWP (frame)) + if (CONSP (frame)) + frame = XCONS (frame)->car; + else if (WINDOWP (frame)) frame = WINDOW_FRAME (XWINDOW (frame)); focus = FRAME_FOCUS_FRAME (XFRAME (frame)); @@ -3165,6 +3159,14 @@ } #endif /* HAVE_MOUSE */ +#ifdef USE_X_TOOLKIT + case menu_bar_event: + /* The event value is in the cdr of the frame_or_window slot. */ + if (!CONSP (event->frame_or_window)) + abort (); + return XCONS (event->frame_or_window)->cdr; +#endif + /* The 'kind' field of the event is something we don't recognize. */ default: abort ();