From: Eli Zaretskii Date: Sun, 22 Sep 2013 15:23:06 +0000 (+0300) Subject: Half-solution for menus popped up by mouse clicks. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1328^2~33 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ace926507379e836df263c4a0310eed285181c6;p=emacs.git Half-solution for menus popped up by mouse clicks. --- diff --git a/src/keyboard.c b/src/keyboard.c index c029239b446..4ace767484e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1716,7 +1716,7 @@ read_menu_command (void) if (! FRAME_LIVE_P (XFRAME (selected_frame))) Fkill_emacs (Qnil); if (i == 0 || i == -1) - return Qnil; + return Qt; return read_key_sequence_cmd; } diff --git a/src/term.c b/src/term.c index d0fd0722da1..26fa64da62d 100644 --- a/src/term.c +++ b/src/term.c @@ -3176,11 +3176,15 @@ read_menu_input (struct frame *sf, int *x, int *y, bool *first_time) { #if 1 extern Lisp_Object read_menu_command (void); - Lisp_Object cmd = read_menu_command (); + Lisp_Object cmd; int usable_input = 1; int st = 0; - if (NILP (cmd)) + do { + cmd = read_menu_command (); + } while NILP (cmd); + + if (EQ (cmd, Qt)) return -1; if (EQ (cmd, Qright_char) || EQ (cmd, Qforward_char)) *x += 1;