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 | d31d42cc68c295539f9d0920b98b87759ecb729e (patch) | |
| tree | f689f675c30a35abdc02cfac4a19c2702ce57c9a /src/xmenu.c | |
| parent | 77e5a3c7ce50576d0688c037d85f3376303db965 (diff) | |
| download | emacs-d31d42cc68c295539f9d0920b98b87759ecb729e.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 |
