diff options
| author | Richard M. Stallman | 1996-12-10 23:25:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-12-10 23:25:14 +0000 |
| commit | bfc524bcad6f0523e61254a91e76bcedf3a65d11 (patch) | |
| tree | 0d6471fbcabba408b1528b40fb5c3880ff3a3afe /src | |
| parent | c08fe8fdc55065906c4aea8ce8e521c5809aeaff (diff) | |
| download | emacs-bfc524bcad6f0523e61254a91e76bcedf3a65d11.tar.gz emacs-bfc524bcad6f0523e61254a91e76bcedf3a65d11.zip | |
(Vmenu_updating_frame): New variable.
(syms_of_xmenu): Set up Lisp var.
(Fx_popup_menu, set_frame_menubar): Initialize it.
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 cec9aa0d004..46b75cc1dbb 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -86,6 +86,8 @@ Boston, MA 02111-1307, USA. */ | |||
| 86 | #define FALSE 0 | 86 | #define FALSE 0 |
| 87 | #endif /* no TRUE */ | 87 | #endif /* no TRUE */ |
| 88 | 88 | ||
| 89 | Lisp_Object Vmenu_updating_frame; | ||
| 90 | |||
| 89 | Lisp_Object Qdebug_on_next_call; | 91 | Lisp_Object Qdebug_on_next_call; |
| 90 | 92 | ||
| 91 | Lisp_Object Qmenu_alias; | 93 | Lisp_Object Qmenu_alias; |
| @@ -856,7 +858,10 @@ cached information about equivalent key sequences.") | |||
| 856 | 858 | ||
| 857 | xpos += XINT (x); | 859 | xpos += XINT (x); |
| 858 | ypos += XINT (y); | 860 | ypos += XINT (y); |
| 861 | |||
| 862 | XSETFRAME (Vmenu_updating_frame, f); | ||
| 859 | } | 863 | } |
| 864 | Vmenu_updating_frame = Qnil; | ||
| 860 | #endif /* HAVE_MENUS */ | 865 | #endif /* HAVE_MENUS */ |
| 861 | 866 | ||
| 862 | title = Qnil; | 867 | title = Qnil; |
| @@ -1618,6 +1623,8 @@ set_frame_menubar (f, first_time, deep_p) | |||
| 1618 | int i; | 1623 | int i; |
| 1619 | LWLIB_ID id; | 1624 | LWLIB_ID id; |
| 1620 | 1625 | ||
| 1626 | XSETFRAME (Vmenu_updating_frame, f); | ||
| 1627 | |||
| 1621 | if (f->output_data.x->id == 0) | 1628 | if (f->output_data.x->id == 0) |
| 1622 | f->output_data.x->id = next_menubar_widget_id++; | 1629 | f->output_data.x->id = next_menubar_widget_id++; |
| 1623 | id = f->output_data.x->id; | 1630 | id = f->output_data.x->id; |
| @@ -2708,6 +2715,11 @@ syms_of_xmenu () | |||
| 2708 | Qdebug_on_next_call = intern ("debug-on-next-call"); | 2715 | Qdebug_on_next_call = intern ("debug-on-next-call"); |
| 2709 | staticpro (&Qdebug_on_next_call); | 2716 | staticpro (&Qdebug_on_next_call); |
| 2710 | 2717 | ||
| 2718 | DEFVAR_LISP ("menu-updating-frame", &Vmenu_updating_frame, | ||
| 2719 | "Frame for which we are updating a menu.\n\ | ||
| 2720 | The enable predicate for a menu command should check this variable."); | ||
| 2721 | Vmenu_updating_frame = Qnil; | ||
| 2722 | |||
| 2711 | #ifdef USE_X_TOOLKIT | 2723 | #ifdef USE_X_TOOLKIT |
| 2712 | widget_id_tick = (1<<16); | 2724 | widget_id_tick = (1<<16); |
| 2713 | next_menubar_widget_id = 1; | 2725 | next_menubar_widget_id = 1; |