* xmenu.c (popup_get_selection): Only pop down dialogs
on C-g and Escape.
+ (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.
2004-12-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **));
static void popup_get_selection P_ ((XEvent *, struct x_display_info *,
- LWLIB_ID, int, int));
+ LWLIB_ID, int));
/* Define HAVE_BOXES if menus can handle radio and toggle buttons. */
popped down (deactivated). This is used for x-popup-menu
and x-popup-dialog; it is not used for the menu bar.
- If DOWN_ON_KEYPRESS is nonzero, pop down if a key is pressed.
-
NOTE: All calls to popup_get_selection should be protected
with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */
static void
-popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress)
+popup_get_selection (initial_event, dpyinfo, id, do_timers)
XEvent *initial_event;
struct x_display_info *dpyinfo;
LWLIB_ID id;
int do_timers;
- int down_on_keypress;
{
XEvent event;
}
/* Pop down on C-g and Escape. */
else if (event.type == KeyPress
- && down_on_keypress
&& dpyinfo->display == event.xbutton.display)
{
KeySym keysym = XLookupKeysym (&event.xkey, 0);
make_number (menu_id & ~(-1 << (fact)))));
/* Process events that apply to the menu. */
- popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1, 0);
+ popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1);
unbind_to (specpdl_count, Qnil);
}
make_number (dialog_id & ~(-1 << (fact)))));
popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f),
- dialog_id, 1, 1);
+ dialog_id, 1);
unbind_to (count, Qnil);
}