]> code.delx.au - gnu-emacs/blobdiff - src/w32menu.c
Remove '23' comments that indicated code added during update from emacs-20 -> emacs-23.
[gnu-emacs] / src / w32menu.c
index 4de203c9b3940a7859613b9a4b4b7effc9626dcc..677de1b180a1ec9666df784c5906080678a7fbf4 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.
@@ -103,10 +103,6 @@ static Lisp_Object w32_menu_show P_ ((FRAME_PTR, int, int, int, int,
 
 void w32_free_menu_strings P_((HWND));
 \f
-static int next_menubar_widget_id;
-
-extern widget_value *xmalloc_widget_value P_ ((void));
-extern widget_value *digest_single_submenu P_ ((int, int, int));
 
 /* This is set nonzero after the user activates the menu bar, and set
    to zero again after the menu bars are redisplayed by prepare_menu_bar.
@@ -346,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;
     }
@@ -359,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;
     }
@@ -371,6 +369,7 @@ cached information about equivalent key sequences.  */)
   UNBLOCK_INPUT;
 
   discard_menu_items ();
+  FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
 
 #endif /* HAVE_MENUS */
 
@@ -499,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;
@@ -1169,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);