aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index b6d8f6fe24a..9642dcad133 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2439,14 +2439,6 @@ kbd_buffer_get_event (KBOARD **kbp)
2439 kbd_fetch_ptr = event + 1; 2439 kbd_fetch_ptr = event + 1;
2440 } 2440 }
2441#endif 2441#endif
2442 else if (event->kind == menu_bar_event)
2443 {
2444 /* The event value is in the cdr of the frame_or_window slot. */
2445 if (!CONSP (event->frame_or_window))
2446 abort ();
2447 obj = XCONS (event->frame_or_window)->cdr;
2448 kbd_fetch_ptr = event + 1;
2449 }
2450 else if (event->kind == buffer_switch_event) 2442 else if (event->kind == buffer_switch_event)
2451 { 2443 {
2452 /* The value doesn't matter here; only the type is tested. */ 2444 /* The value doesn't matter here; only the type is tested. */
@@ -2471,7 +2463,9 @@ kbd_buffer_get_event (KBOARD **kbp)
2471 Lisp_Object focus; 2463 Lisp_Object focus;
2472 2464
2473 frame = event->frame_or_window; 2465 frame = event->frame_or_window;
2474 if (WINDOWP (frame)) 2466 if (CONSP (frame))
2467 frame = XCONS (frame)->car;
2468 else if (WINDOWP (frame))
2475 frame = WINDOW_FRAME (XWINDOW (frame)); 2469 frame = WINDOW_FRAME (XWINDOW (frame));
2476 2470
2477 focus = FRAME_FOCUS_FRAME (XFRAME (frame)); 2471 focus = FRAME_FOCUS_FRAME (XFRAME (frame));
@@ -3165,6 +3159,14 @@ make_lispy_event (event)
3165 } 3159 }
3166#endif /* HAVE_MOUSE */ 3160#endif /* HAVE_MOUSE */
3167 3161
3162#ifdef USE_X_TOOLKIT
3163 case menu_bar_event:
3164 /* The event value is in the cdr of the frame_or_window slot. */
3165 if (!CONSP (event->frame_or_window))
3166 abort ();
3167 return XCONS (event->frame_or_window)->cdr;
3168#endif
3169
3168 /* The 'kind' field of the event is something we don't recognize. */ 3170 /* The 'kind' field of the event is something we don't recognize. */
3169 default: 3171 default:
3170 abort (); 3172 abort ();