# HG changeset patch # User Fred Pierresteguy # Date 759668519 0 # Node ID 6479e0eabb275c4da31064b05ef4d7dd1652d429 # Parent b9bafc8d02836a68d7a3677e6431c8aa64a78a37 * keyboard.c (make_lispy_event): Add USE_X_TOOLKIT conditional and test FRAME_EXTERNAL_MENU_BAR. (map_event_to_object) [USE_X_TOOLKIT]: Declare and use it. diff -r b9bafc8d0283 -r 6479e0eabb27 src/keyboard.c --- a/src/keyboard.c Wed Jan 26 21:09:54 1994 +0000 +++ b/src/keyboard.c Thu Jan 27 11:01:59 1994 +0000 @@ -2386,6 +2386,10 @@ int double_click_count; +#ifdef USE_X_TOOLKIT +extern Lisp_Object map_event_to_object (); +#endif /* USE_X_TOOLKIT */ + /* Given a struct input_event, build the lisp event which represents it. If EVENT is 0, build a mouse movement event from the mouse movement buffer, which should have a movement event in it. @@ -2484,6 +2488,14 @@ &part); Lisp_Object posn; +#ifdef USE_X_TOOLKIT + if (FRAME_EXTERNAL_MENU_BAR (f) && XINT (event->y) == -1) + { + /* The click happened in the menubar. + Look for the menu item selected. */ + Lisp_Object items = map_event_to_object(event, f); + XFASTINT (event->y) = 1; +#else /* not USE_X_TOOLKIT */ if (XINT (event->y) < FRAME_MENU_BAR_LINES (f)) { int hpos; @@ -2498,6 +2510,7 @@ && XINT (event->x) < XINT (pos) + XSTRING (string)->size) break; } +#endif /* not USE_X_TOOLKIT */ position = Fcons (event->frame_or_window, Fcons (Qmenu_bar,