changeset 80759:c3bd08b7c78d

(Fx_popup_menu, Fx_popup_dialog, w32_menu_show): Ensure mouse is not grabbed after menu is finished.
author Jason Rumney <jasonr@gnu.org>
date Tue, 26 Aug 2008 14:23:25 +0000
parents 654843fddea6
children a8b621bdac2c
files src/ChangeLog src/w32menu.c
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Aug 26 14:04:14 2008 +0000
+++ b/src/ChangeLog	Tue Aug 26 14:23:25 2008 +0000
@@ -1,3 +1,8 @@
+2008-08-26  Jason Rumney  <jasonr@gnu.org>
+
+	* w32menu.c (Fx_popup_menu, Fx_popup_dialog, w32_menu_show): Ensure
+	mouse is not grabbed after menu is finished.
+
 2008-08-26  Juanma Barranquero  <lekktu@gmail.com>
 
 	* editfns.c (Ffield_string_no_properties): Fix typo in docstring.
--- a/src/w32menu.c	Tue Aug 26 14:04:14 2008 +0000
+++ b/src/w32menu.c	Tue Aug 26 14:23:25 2008 +0000
@@ -812,6 +812,7 @@
   if (NILP (position))
     {
       discard_menu_items ();
+      FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
       UNGCPRO;
       return Qnil;
     }
@@ -825,6 +826,7 @@
   if (current_popup_menu)
     {
       discard_menu_items ();
+      FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
       UNGCPRO;
       return Qnil;
     }
@@ -837,6 +839,7 @@
   UNBLOCK_INPUT;
 
   discard_menu_items ();
+  FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
 
 #endif /* HAVE_MENUS */
 
@@ -959,6 +962,7 @@
     UNBLOCK_INPUT;
 
     discard_menu_items ();
+    FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
 
     if (error_name) error (error_name);
     return selection;
@@ -1931,6 +1935,7 @@
   /* Clean up extraneous mouse events which might have been generated
      during the call. */
   discard_mouse_events ();
+  FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
 
   /* Free the widget_value objects we used to specify the contents.  */
   free_menubar_widget_value_tree (first_wv);