# HG changeset patch # User Karl Heuer # Date 797300553 0 # Node ID 7b90c1076881fded0a2a569c4b4a6aa032f5f0ec # Parent 0340dba1df7ea0318ac34be7e0cc62c8ba27a940 (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. diff -r 0340dba1df7e -r 7b90c1076881 src/keyboard.c --- 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 ();