changeset 62994:b83593f0515d

(popup_get_selection): Click not in menu deactivates menu.
author Richard M. Stallman <rms@gnu.org>
date Sat, 04 Jun 2005 18:05:28 +0000
parents 67de0f04e17e
children bb12074c28f3
files src/xmenu.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Sat Jun 04 10:24:11 2005 +0000
+++ b/src/xmenu.c	Sat Jun 04 18:05:28 2005 +0000
@@ -1235,6 +1235,10 @@
       if (event.type == ButtonRelease
           && dpyinfo->display == event.xbutton.display)
         {
+	  /* If the click is not on the menu, deactivate the menu.  */
+	  if (x_any_window_to_frame (dpyinfo, event.xexpose.window))
+	    popup_activated_flag = 0;
+	    
           dpyinfo->grabbed &= ~(1 << event.xbutton.button);
 #ifdef USE_MOTIF /* Pretending that the event came from a
                     Btn1Down seems the only way to convince Motif to