diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-09-24 23:33:06 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-09-24 23:33:06 +0000 |
commit | 629db5242287def755321b72bf26e5a4aa196c89 (patch) | |
tree | a86fc952b6477258c529988fa8102842b9a08ef7 /src/xmenu.c | |
parent | 360eba66f408979bb21c043461e43f7201a9c711 (diff) | |
download | emacs-629db5242287def755321b72bf26e5a4aa196c89.tar.gz |
(popup_get_selection): Pop menu down if button is pressed
outside the menu.
(xmenu_show): Ignore `quote' when looking up the result.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r-- | src/xmenu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 993ae91e744..e5fc62e6dee 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1095,6 +1095,14 @@ popup_get_selection (initial_event, dpyinfo, id) popup_activated_flag = 0; break; } + /* Button presses outside the menu also pop it down. */ + else if (event.type == ButtonPress + && event.xany.display == dpyinfo->display + && x_any_window_to_frame (dpyinfo, event.xany.window)) + { + popup_activated_flag = 0; + break; + } /* Queue all events not for this popup, except for Expose, which we've already handled. @@ -2089,6 +2097,10 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; i += MENU_ITEMS_PANE_LENGTH; } + /* Ignore a nil in the item list. + It's meaningful only for dialog boxes. */ + else if (EQ (XVECTOR (menu_items)->contents[i], Qquote)) + i += 1; else { entry |