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. */
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));
}
#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 ();