Mercurial > emacs
diff src/xmenu.c @ 83224:7a0245dd1848
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-653
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-654
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-655
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-656
Update from CVS: lisp/man.el (Man-xref-normal-file): Fix help-echo.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-657
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-658
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-659
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-660
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-661
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-662
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-663
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-664
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-665
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-666
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-667
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-669
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-670
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-671
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-64
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-65
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-66
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-67
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-68
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-264
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 06 Nov 2004 17:52:02 +0000 |
parents | 42acc7fa8a4f fad95a27e1d8 |
children | 9ea0f6980511 |
line wrap: on
line diff
--- a/src/xmenu.c Sun Oct 31 02:05:24 2004 +0000 +++ b/src/xmenu.c Sat Nov 06 17:52:02 2004 +0000 @@ -110,11 +110,12 @@ extern Lisp_Object Qmenu_bar_update_hook; #ifdef USE_X_TOOLKIT -extern void set_frame_menubar (); +extern void set_frame_menubar P_ ((FRAME_PTR, int, int)); extern XtAppContext Xt_app_con; -static Lisp_Object xdialog_show (); -static void popup_get_selection (); +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)); /* Define HAVE_BOXES if menus can handle radio and toggle buttons. */ @@ -124,8 +125,8 @@ #ifdef USE_GTK #include "gtkutil.h" #define HAVE_BOXES 1 -extern void set_frame_menubar (); -static Lisp_Object xdialog_show (); +extern void set_frame_menubar P_ ((FRAME_PTR, int, int)); +static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); #endif /* This is how to deal with multibyte text if HAVE_MULTILINGUAL_MENU @@ -156,7 +157,6 @@ static void list_of_panes P_ ((Lisp_Object)); static void list_of_items P_ ((Lisp_Object)); -extern EMACS_TIME timer_check P_ ((int)); /* This holds a Lisp vector that holds the results of decoding the keymaps or alist-of-alists that specify a menu. @@ -1120,29 +1120,28 @@ popped down (deactivated). This is used for x-popup-menu and x-popup-dialog; it is not used for the menu bar. - If DO_TIMERS is nonzero, run timers. If DOWN_ON_KEYPRESS is nonzero, pop down if a key is pressed. + This function used to have a DO_TIMERS argument which was + 1 in the dialog case, and caused it to run Lisp-level timers. + That was unsafe so we removed it, but does anyone remember + why menus and dialogs were treated differently? + NOTE: All calls to popup_get_selection should be protected with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ #ifdef USE_X_TOOLKIT static void -popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) +popup_get_selection (initial_event, dpyinfo, id, down_on_keypress) XEvent *initial_event; struct x_display_info *dpyinfo; LWLIB_ID id; - int do_timers; int down_on_keypress; { XEvent event; while (popup_activated_flag) { - /* If we have no events to run, consider timers. */ - if (do_timers && !XtAppPending (Xt_app_con)) - timer_check (1); - if (initial_event) { event = *initial_event; @@ -2489,7 +2488,7 @@ popup_activated_flag = 1; /* Process events that apply to the menu. */ - popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0, 0); + popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0); /* fp turned off the following statement and wrote a comment that it is unnecessary--that the menu has already disappeared. @@ -2883,8 +2882,7 @@ Fcons (make_number (dialog_id >> (fact)), make_number (dialog_id & ~(-1 << (fact))))); - popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), - dialog_id, 1, 1); + popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1); unbind_to (count, Qnil); }