diff options
author | Eli Zaretskii <eliz@gnu.org> | 2013-09-21 17:53:04 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-09-21 17:53:04 +0300 |
commit | f0177f86f745ef86357214b110f9d98e4ed63b7a (patch) | |
tree | 85f8cbb3a930a39ea84bb02637279b7a783d37eb /src/w32menu.c | |
parent | e11a3bd1d1848d0a3a2ac21a48360eb628127ed9 (diff) | |
download | emacs-f0177f86f745ef86357214b110f9d98e4ed63b7a.tar.gz |
Fix infinite loop in menu input due to block_input.
Diffstat (limited to 'src/w32menu.c')
-rw-r--r-- | src/w32menu.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index 34020fa61d2..f804e830ac0 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -682,6 +682,8 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps, return Qnil; } + block_input (); + /* Create a tree of widget_value objects representing the panes and their items. */ wv = xmalloc_widget_value (); @@ -940,6 +942,7 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps, if (!NILP (subprefix_stack[j])) entry = Fcons (subprefix_stack[j], entry); } + unblock_input (); return entry; } i += MENU_ITEMS_ITEM_LENGTH; @@ -947,9 +950,13 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps, } } else if (!for_click) - /* Make "Cancel" equivalent to C-g. */ - Fsignal (Qquit, Qnil); + { + unblock_input (); + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); + } + unblock_input (); return Qnil; } |