Mercurial > emacs
changeset 5684:6479e0eabb27
* 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.
author | Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr> |
---|---|
date | Thu, 27 Jan 1994 11:01:59 +0000 |
parents | b9bafc8d0283 |
children | 07f5e3a0f905 |
files | src/keyboard.c |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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,