diff options
| author | Richard M. Stallman | 1995-09-24 23:33:06 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-09-24 23:33:06 +0000 |
| commit | d31d42cc68c295539f9d0920b98b87759ecb729e (patch) | |
| tree | f689f675c30a35abdc02cfac4a19c2702ce57c9a /src | |
| parent | 77e5a3c7ce50576d0688c037d85f3376303db965 (diff) | |
| download | emacs-d31d42cc68c295539f9d0920b98b87759ecb729e.tar.gz emacs-d31d42cc68c295539f9d0920b98b87759ecb729e.zip | |
(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')
| -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) | |||
| 1095 | popup_activated_flag = 0; | 1095 | popup_activated_flag = 0; |
| 1096 | break; | 1096 | break; |
| 1097 | } | 1097 | } |
| 1098 | /* Button presses outside the menu also pop it down. */ | ||
| 1099 | else if (event.type == ButtonPress | ||
| 1100 | && event.xany.display == dpyinfo->display | ||
| 1101 | && x_any_window_to_frame (dpyinfo, event.xany.window)) | ||
| 1102 | { | ||
| 1103 | popup_activated_flag = 0; | ||
| 1104 | break; | ||
| 1105 | } | ||
| 1098 | 1106 | ||
| 1099 | /* Queue all events not for this popup, | 1107 | /* Queue all events not for this popup, |
| 1100 | except for Expose, which we've already handled. | 1108 | except for Expose, which we've already handled. |
| @@ -2089,6 +2097,10 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2089 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; | 2097 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; |
| 2090 | i += MENU_ITEMS_PANE_LENGTH; | 2098 | i += MENU_ITEMS_PANE_LENGTH; |
| 2091 | } | 2099 | } |
| 2100 | /* Ignore a nil in the item list. | ||
| 2101 | It's meaningful only for dialog boxes. */ | ||
| 2102 | else if (EQ (XVECTOR (menu_items)->contents[i], Qquote)) | ||
| 2103 | i += 1; | ||
| 2092 | else | 2104 | else |
| 2093 | { | 2105 | { |
| 2094 | entry | 2106 | entry |