diff src/xmenu.c @ 73788:177184091f28

(Fmenu_or_popup_active_p): Define outside HAVE_MENUS. Return nil if building without menus.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 06 Nov 2006 16:47:33 +0000
parents fbb020e31484
children b662c7bb9e5f 02cf29720f31
line wrap: on
line diff
--- a/src/xmenu.c	Mon Nov 06 16:47:07 2006 +0000
+++ b/src/xmenu.c	Mon Nov 06 16:47:33 2006 +0000
@@ -1414,7 +1414,7 @@
 
       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 @@
   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 @@
 #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 ()