summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-11-06 16:47:33 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-11-06 16:47:33 +0000
commite3135734b208cffc5a5319714fa036b15e950a2e (patch)
tree55456019d0388eb280f73c82462d7d852585db7d /src/xmenu.c
parentc1f043a06378a5a3f6f5dd5b7b1b383439ebc9ef (diff)
downloademacs-e3135734b208cffc5a5319714fa036b15e950a2e.tar.gz
(Fmenu_or_popup_active_p): Define outside HAVE_MENUS.
Return nil if building without menus.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 397e8a59e81..24be4fd5cb7 100644
--- a/src/xmenu.c
+++ b/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 ()