changeset 8539:1ef305a42786

(xmenu_show): Unconditionally update x_mouse_grabbed and Vmouse_depressed.
author Richard M. Stallman <rms@gnu.org>
date Sun, 14 Aug 1994 00:42:40 +0000
parents 94145efe2ad8
children 9c1de425567f
files src/xmenu.c
diffstat 1 files changed, 12 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Sat Aug 13 23:58:50 1994 +0000
+++ b/src/xmenu.c	Sun Aug 14 00:42:40 1994 +0000
@@ -1655,16 +1655,18 @@
       if (event.type == ButtonRelease)
 	{
 	  XtDispatchEvent (&event);
-	  if (! menubarp)
-	    {
-	      /* Do the work of construct_mouse_click since it can't
-		 be called. Initially, the popup menu has been called
-		 from a ButtonPress in the edit_widget. Then the mouse
-		 has been set to grabbed. Reset it now.  */
-	      x_mouse_grabbed &= ~(1 << event.xbutton.button);
-	      if (!x_mouse_grabbed)
-		Vmouse_depressed = Qnil;
-	    }
+
+	  /* Do the work of construct_mouse_click since it can't
+	     be called. Initially, the popup menu has been called
+	     from a ButtonPress in the edit_widget. Then the mouse
+	     has been set to grabbed. Reset it now.  */
+	  x_mouse_grabbed &= ~(1 << event.xbutton.button);
+	  if (!x_mouse_grabbed)
+	    Vmouse_depressed = Qnil;
+
+	  /* If we release the button soon without selecting anything,
+	     stay in the loop--that is, leave the menu posted.
+	     Otherwise, exit this loop and thus pop down the menu.  */
 	  if (! (menu_item_selection == 0
 		 && !next_release_must_exit
 		 && (((XButtonEvent *) (&event))->time - last_event_timestamp