diff options
| author | Eli Zaretskii | 2006-11-05 12:17:26 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-11-05 12:17:26 +0000 |
| commit | e5d3d18d5cc97a0884839d7f15f141e2db8cc21d (patch) | |
| tree | f8fa3a4e503ea2d501f0673041832ed2127d3ac0 /src | |
| parent | 0ec2e29e9b11ca2959b6d338a6f548292bfe08d4 (diff) | |
| download | emacs-e5d3d18d5cc97a0884839d7f15f141e2db8cc21d.tar.gz emacs-e5d3d18d5cc97a0884839d7f15f141e2db8cc21d.zip | |
(Fmenu_or_popup_active_p): New function.
(syms_of_w32menu): Defsubr it.
(popup_activated_flag, popup_activated): Remove.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32menu.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index 3a4dc20fc15..cf7103b727b 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -235,10 +235,6 @@ static int menu_items_n_panes; | |||
| 235 | /* Current depth within submenus. */ | 235 | /* Current depth within submenus. */ |
| 236 | static int menu_items_submenu_depth; | 236 | static int menu_items_submenu_depth; |
| 237 | 237 | ||
| 238 | /* Flag which when set indicates a dialog or menu has been posted by | ||
| 239 | Xt on behalf of one of the widget sets. */ | ||
| 240 | static int popup_activated_flag; | ||
| 241 | |||
| 242 | static int next_menubar_widget_id; | 238 | static int next_menubar_widget_id; |
| 243 | 239 | ||
| 244 | /* This is set nonzero after the user activates the menu bar, and set | 240 | /* This is set nonzero after the user activates the menu bar, and set |
| @@ -994,6 +990,17 @@ x_activate_menubar (f) | |||
| 994 | complete_deferred_msg (FRAME_W32_WINDOW (f), WM_INITMENU, 0); | 990 | complete_deferred_msg (FRAME_W32_WINDOW (f), WM_INITMENU, 0); |
| 995 | } | 991 | } |
| 996 | 992 | ||
| 993 | /* The following is used by delayed window autoselection. */ | ||
| 994 | |||
| 995 | DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, | ||
| 996 | doc: /* Return t if a menu or popup dialog is active on selected frame. */) | ||
| 997 | () | ||
| 998 | { | ||
| 999 | FRAME_PTR f; | ||
| 1000 | f = SELECTED_FRAME (); | ||
| 1001 | return (f->output_data.w32->menubar_active > 0) ? Qt : Qnil; | ||
| 1002 | } | ||
| 1003 | |||
| 997 | /* This callback is called from the menu bar pulldown menu | 1004 | /* This callback is called from the menu bar pulldown menu |
| 998 | when the user makes a selection. | 1005 | when the user makes a selection. |
| 999 | Figure out what the user chose | 1006 | Figure out what the user chose |
| @@ -2148,7 +2155,6 @@ w32_dialog_show (f, keymaps, title, header, error) | |||
| 2148 | 2155 | ||
| 2149 | /* Display the menu. */ | 2156 | /* Display the menu. */ |
| 2150 | lw_pop_up_all_widgets (dialog_id); | 2157 | lw_pop_up_all_widgets (dialog_id); |
| 2151 | popup_activated_flag = 1; | ||
| 2152 | 2158 | ||
| 2153 | /* Process events that apply to the menu. */ | 2159 | /* Process events that apply to the menu. */ |
| 2154 | popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id); | 2160 | popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id); |
| @@ -2428,13 +2434,6 @@ fill_in_menu (HMENU menu, widget_value *wv) | |||
| 2428 | return 1; | 2434 | return 1; |
| 2429 | } | 2435 | } |
| 2430 | 2436 | ||
| 2431 | int | ||
| 2432 | popup_activated () | ||
| 2433 | { | ||
| 2434 | /* popup_activated_flag not actually used on W32 */ | ||
| 2435 | return 0; | ||
| 2436 | } | ||
| 2437 | |||
| 2438 | /* Display help string for currently pointed to menu item. Not | 2437 | /* Display help string for currently pointed to menu item. Not |
| 2439 | supported on NT 3.51 and earlier, as GetMenuItemInfo is not | 2438 | supported on NT 3.51 and earlier, as GetMenuItemInfo is not |
| 2440 | available. */ | 2439 | available. */ |
| @@ -2549,6 +2548,7 @@ void syms_of_w32menu () | |||
| 2549 | staticpro (&Qdebug_on_next_call); | 2548 | staticpro (&Qdebug_on_next_call); |
| 2550 | 2549 | ||
| 2551 | defsubr (&Sx_popup_menu); | 2550 | defsubr (&Sx_popup_menu); |
| 2551 | defsubr (&Smenu_or_popup_active_p); | ||
| 2552 | #ifdef HAVE_MENUS | 2552 | #ifdef HAVE_MENUS |
| 2553 | defsubr (&Sx_popup_dialog); | 2553 | defsubr (&Sx_popup_dialog); |
| 2554 | #endif | 2554 | #endif |