changeset 13071:2e514396cbc8

(popup_get_selection): Pop menu down if button is pressed outside the menu. (xmenu_show): Ignore `quote' when looking up the result.
author Richard M. Stallman <rms@gnu.org>
date Sun, 24 Sep 1995 23:33:06 +0000
parents c668502d5a93
children c5e3d029241d
files src/xmenu.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Sun Sep 24 23:28:18 1995 +0000
+++ b/src/xmenu.c	Sun Sep 24 23:33:06 1995 +0000
@@ -1095,6 +1095,14 @@
 	  popup_activated_flag = 0;
 	  break;
 	}
+      /* Button presses outside the menu also pop it down.  */
+      else if (event.type == ButtonPress
+	       && event.xany.display == dpyinfo->display
+	       && x_any_window_to_frame (dpyinfo, event.xany.window))
+	{
+	  popup_activated_flag = 0;
+	  break;
+	}
 
       /* Queue all events not for this popup,
 	 except for Expose, which we've already handled.
@@ -2089,6 +2097,10 @@
 		= XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX];
 	      i += MENU_ITEMS_PANE_LENGTH;
 	    }
+	  /* Ignore a nil in the item list.
+	     It's meaningful only for dialog boxes.  */
+	  else if (EQ (XVECTOR (menu_items)->contents[i], Qquote))
+	    i += 1;
 	  else
 	    {
 	      entry