X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/c1d9dffd9a69144ddf27d46e67eaf7344fea0beb..f3e0a6de08025d4f77a55b74a28760cc9a5e30e7:/src/w32menu.c diff --git a/src/w32menu.c b/src/w32menu.c index dfd885eee0..11af1d66b6 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1,6 +1,6 @@ /* Menu support for GNU Emacs on the Microsoft W32 API. Copyright (C) 1986, 1988, 1993, 1994, 1996, 1998, 1999, 2002, 2003, - 2004, 2005 Free Software Foundation, Inc. + 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -819,8 +819,10 @@ cached information about equivalent key sequences. */) } #ifdef HAVE_MENUS - /* If resources from a previous popup menu exist yet, does nothing - until the `menu_free_timer' has freed them (see w32fns.c). + /* If resources from a previous popup menu still exist, does nothing + until the `menu_free_timer' has freed them (see w32fns.c). This + can occur if you press ESC or click outside a menu without selecting + a menu item. */ if (current_popup_menu) { @@ -837,6 +839,8 @@ cached information about equivalent key sequences. */) UNBLOCK_INPUT; discard_menu_items (); + w32_free_menu_strings (FRAME_W32_WINDOW (f)); + #endif /* HAVE_MENUS */ UNGCPRO; @@ -1990,6 +1994,9 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) } } } + else if (!for_click) + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); return Qnil; } @@ -2182,6 +2189,9 @@ w32_dialog_show (f, keymaps, title, header, error) } } } + else + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); return Qnil; }