Add 2009 to copyright years.
[bpt/emacs.git] / src / w32menu.c
index fb54caf..677de1b 100644 (file)
@@ -1,6 +1,6 @@
 /* Menu support for GNU Emacs on the Microsoft W32 API.
    Copyright (C) 1986, 1988, 1993, 1994, 1996, 1998, 1999, 2001, 2002,
-                 2003, 2004, 2005, 2006, 2007, 2008
+                 2003, 2004, 2005, 2006, 2007, 2008, 2009
                  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -342,6 +342,7 @@ cached information about equivalent key sequences.  */)
   if (NILP (position))
     {
       discard_menu_items ();
+      FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
       UNGCPRO;
       return Qnil;
     }
@@ -355,6 +356,7 @@ cached information about equivalent key sequences.  */)
   if (current_popup_menu)
     {
       discard_menu_items ();
+      FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
       UNGCPRO;
       return Qnil;
     }
@@ -367,6 +369,7 @@ cached information about equivalent key sequences.  */)
   UNBLOCK_INPUT;
 
   discard_menu_items ();
+  FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
 
 #endif /* HAVE_MENUS */
 
@@ -495,6 +498,7 @@ otherwise it is "Question". */)
     UNBLOCK_INPUT;
 
     discard_menu_items ();
+    FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
 
     if (error_name) error (error_name);
     return selection;
@@ -1165,6 +1169,7 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error)
   /* 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);