diff src/w32menu.c @ 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 fc2bcd2a8aad
children ab6494b53df0
line wrap: on
line diff
--- 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);