diff options
| author | Jan Djärv | 2004-12-27 20:56:56 +0000 |
|---|---|---|
| committer | Jan Djärv | 2004-12-27 20:56:56 +0000 |
| commit | 95bdef2ed441e60ae9fc0d0b252f008f2121942e (patch) | |
| tree | f62f289718429af8c3d441a222f3667f13593332 /src | |
| parent | 33385c6fa06f2a9faef28252cd2e073b11e84c20 (diff) | |
| download | emacs-95bdef2ed441e60ae9fc0d0b252f008f2121942e.tar.gz emacs-95bdef2ed441e60ae9fc0d0b252f008f2121942e.zip | |
(popup_get_selection): Remove parameter down_on_keypress.
(create_and_show_popup_menu, create_and_show_dialog): Remove
parameter down_on_keypress to popup_get_selection.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xmenu.c | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f016801fd96..26ea457a2fe 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -2,6 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | * xmenu.c (popup_get_selection): Only pop down dialogs | 3 | * xmenu.c (popup_get_selection): Only pop down dialogs |
| 4 | on C-g and Escape. | 4 | on C-g and Escape. |
| 5 | (popup_get_selection): Remove parameter down_on_keypress. | ||
| 6 | (create_and_show_popup_menu, create_and_show_dialog): Remove | ||
| 7 | parameter down_on_keypress to popup_get_selection. | ||
| 5 | 8 | ||
| 6 | 2004-12-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 9 | 2004-12-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 7 | 10 | ||
diff --git a/src/xmenu.c b/src/xmenu.c index ba4177fab67..f9c2dc4bd1b 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -116,7 +116,7 @@ extern XtAppContext Xt_app_con; | |||
| 116 | 116 | ||
| 117 | static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); | 117 | static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); |
| 118 | static void popup_get_selection P_ ((XEvent *, struct x_display_info *, | 118 | static void popup_get_selection P_ ((XEvent *, struct x_display_info *, |
| 119 | LWLIB_ID, int, int)); | 119 | LWLIB_ID, int)); |
| 120 | 120 | ||
| 121 | /* Define HAVE_BOXES if menus can handle radio and toggle buttons. */ | 121 | /* Define HAVE_BOXES if menus can handle radio and toggle buttons. */ |
| 122 | 122 | ||
| @@ -1186,18 +1186,15 @@ x_menu_wait_for_event (void *data) | |||
| 1186 | popped down (deactivated). This is used for x-popup-menu | 1186 | popped down (deactivated). This is used for x-popup-menu |
| 1187 | and x-popup-dialog; it is not used for the menu bar. | 1187 | and x-popup-dialog; it is not used for the menu bar. |
| 1188 | 1188 | ||
| 1189 | If DOWN_ON_KEYPRESS is nonzero, pop down if a key is pressed. | ||
| 1190 | |||
| 1191 | NOTE: All calls to popup_get_selection should be protected | 1189 | NOTE: All calls to popup_get_selection should be protected |
| 1192 | with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ | 1190 | with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ |
| 1193 | 1191 | ||
| 1194 | static void | 1192 | static void |
| 1195 | popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) | 1193 | popup_get_selection (initial_event, dpyinfo, id, do_timers) |
| 1196 | XEvent *initial_event; | 1194 | XEvent *initial_event; |
| 1197 | struct x_display_info *dpyinfo; | 1195 | struct x_display_info *dpyinfo; |
| 1198 | LWLIB_ID id; | 1196 | LWLIB_ID id; |
| 1199 | int do_timers; | 1197 | int do_timers; |
| 1200 | int down_on_keypress; | ||
| 1201 | { | 1198 | { |
| 1202 | XEvent event; | 1199 | XEvent event; |
| 1203 | 1200 | ||
| @@ -1234,7 +1231,6 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) | |||
| 1234 | } | 1231 | } |
| 1235 | /* Pop down on C-g and Escape. */ | 1232 | /* Pop down on C-g and Escape. */ |
| 1236 | else if (event.type == KeyPress | 1233 | else if (event.type == KeyPress |
| 1237 | && down_on_keypress | ||
| 1238 | && dpyinfo->display == event.xbutton.display) | 1234 | && dpyinfo->display == event.xbutton.display) |
| 1239 | { | 1235 | { |
| 1240 | KeySym keysym = XLookupKeysym (&event.xkey, 0); | 1236 | KeySym keysym = XLookupKeysym (&event.xkey, 0); |
| @@ -2599,7 +2595,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) | |||
| 2599 | make_number (menu_id & ~(-1 << (fact))))); | 2595 | make_number (menu_id & ~(-1 << (fact))))); |
| 2600 | 2596 | ||
| 2601 | /* Process events that apply to the menu. */ | 2597 | /* Process events that apply to the menu. */ |
| 2602 | popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1, 0); | 2598 | popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1); |
| 2603 | 2599 | ||
| 2604 | unbind_to (specpdl_count, Qnil); | 2600 | unbind_to (specpdl_count, Qnil); |
| 2605 | } | 2601 | } |
| @@ -2977,7 +2973,7 @@ create_and_show_dialog (f, first_wv) | |||
| 2977 | make_number (dialog_id & ~(-1 << (fact))))); | 2973 | make_number (dialog_id & ~(-1 << (fact))))); |
| 2978 | 2974 | ||
| 2979 | popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), | 2975 | popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), |
| 2980 | dialog_id, 1, 1); | 2976 | dialog_id, 1); |
| 2981 | 2977 | ||
| 2982 | unbind_to (count, Qnil); | 2978 | unbind_to (count, Qnil); |
| 2983 | } | 2979 | } |