(Fmenu_or_popup_active_p): Define outside HAVE_MENUS.
Return nil if building without menus.
This commit is contained in:
parent
c1f043a063
commit
e3135734b2
2 changed files with 30 additions and 21 deletions
|
@ -990,17 +990,6 @@ x_activate_menubar (f)
|
|||
complete_deferred_msg (FRAME_W32_WINDOW (f), WM_INITMENU, 0);
|
||||
}
|
||||
|
||||
/* The following is used by delayed window autoselection. */
|
||||
|
||||
DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
|
||||
doc: /* Return t if a menu or popup dialog is active on selected frame. */)
|
||||
()
|
||||
{
|
||||
FRAME_PTR f;
|
||||
f = SELECTED_FRAME ();
|
||||
return (f->output_data.w32->menubar_active > 0) ? Qt : Qnil;
|
||||
}
|
||||
|
||||
/* This callback is called from the menu bar pulldown menu
|
||||
when the user makes a selection.
|
||||
Figure out what the user chose
|
||||
|
@ -2536,6 +2525,21 @@ w32_free_menu_strings (hwnd)
|
|||
|
||||
#endif /* HAVE_MENUS */
|
||||
|
||||
/* The following is used by delayed window autoselection. */
|
||||
|
||||
DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
|
||||
doc: /* Return t if a menu or popup dialog is active on selected frame. */)
|
||||
()
|
||||
{
|
||||
#ifdef HAVE_MENUS
|
||||
FRAME_PTR f;
|
||||
f = SELECTED_FRAME ();
|
||||
return (f->output_data.w32->menubar_active > 0) ? Qt : Qnil;
|
||||
#else
|
||||
return Qnil;
|
||||
#endif /* HAVE_MENUS */
|
||||
}
|
||||
|
||||
void syms_of_w32menu ()
|
||||
{
|
||||
globals_of_w32menu ();
|
||||
|
|
25
src/xmenu.c
25
src/xmenu.c
|
@ -1414,7 +1414,7 @@ If FRAME is nil or not given, use the selected frame. */)
|
|||
|
||||
gtk_menu_shell_select_item (GTK_MENU_SHELL (menubar),
|
||||
GTK_WIDGET (children->data));
|
||||
|
||||
|
||||
popup_activated_flag = 1;
|
||||
g_list_free (children);
|
||||
}
|
||||
|
@ -1496,15 +1496,6 @@ popup_activated ()
|
|||
return popup_activated_flag;
|
||||
}
|
||||
|
||||
/* The following is used by delayed window autoselection. */
|
||||
|
||||
DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
|
||||
doc: /* Return t if a menu or popup dialog is active. */)
|
||||
()
|
||||
{
|
||||
return (popup_activated ()) ? Qt : Qnil;
|
||||
}
|
||||
|
||||
/* This callback is invoked when the user selects a menubar cascade
|
||||
pushbutton, but before the pulldown menu is posted. */
|
||||
|
||||
|
@ -3770,6 +3761,20 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
|
|||
#endif /* not USE_X_TOOLKIT */
|
||||
|
||||
#endif /* HAVE_MENUS */
|
||||
|
||||
|
||||
/* The following is used by delayed window autoselection. */
|
||||
|
||||
DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
|
||||
doc: /* Return t if a menu or popup dialog is active. */)
|
||||
()
|
||||
{
|
||||
#ifdef HAVE_MENUS
|
||||
return (popup_activated ()) ? Qt : Qnil;
|
||||
#else
|
||||
return Qnil;
|
||||
#endif /* HAVE_MENUS */
|
||||
}
|
||||
|
||||
void
|
||||
syms_of_xmenu ()
|
||||
|
|
Loading…
Add table
Reference in a new issue