]> code.delx.au - gnu-emacs/commitdiff
Half-solution for menus popped up by mouse clicks.
authorEli Zaretskii <eliz@gnu.org>
Sun, 22 Sep 2013 15:23:06 +0000 (18:23 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 22 Sep 2013 15:23:06 +0000 (18:23 +0300)
src/keyboard.c
src/term.c

index c029239b446cee294c6e1fce2fadf8b6a4957241..4ace767484eb949d1ff0767c29b519a3a144ff6d 100644 (file)
@@ -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;
 }
index d0fd0722da13b222289aa682c199f29ced6b817f..26fa64da62ddeaa530a1645980ab8d03db5b82bc 100644 (file)
@@ -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;