]> code.delx.au - gnu-emacs/commitdiff
(last_mouse_window): New variable.
authorEli Zaretskii <eliz@gnu.org>
Sat, 16 Feb 2002 19:25:24 +0000 (19:25 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 16 Feb 2002 19:25:24 +0000 (19:25 +0000)
(dos_rawgetc): Fix last change--if the mouse is in the same window
as recorded in last_mouse_window, don't select this window.

src/ChangeLog
src/msdos.c

index 4daee99e47d5e2f9232a3e086a827847a1a25755..5fbd59f8230cd469a2855cde708cee275923d442 100644 (file)
@@ -1,5 +1,9 @@
 2002-02-16  Eli Zaretskii  <eliz@is.elta.co.il>
 
+       * msdos.c (last_mouse_window): New variable.
+       (dos_rawgetc): Fix last change--if the mouse is in the same window
+       as recorded in last_mouse_window, don't select this window.
+
        * Makefile.in (lisp, shortlisp): Use cus-start.elc, not
        cus-start.el.
 
index f5dff6fb5bc94096fe62fe7fbf0ec97cdc1ce8c1..19304db32e892a9cbc1c607e0de58f6cdbefc3d6 100644 (file)
@@ -1200,6 +1200,9 @@ static int help_echo_pos;
    cursor moves into it.  */
 int x_autoselect_window_p;
 
+/* Last window where we saw the mouse.  Used by x-autoselect-window.  */
+static Lisp_Object last_mouse_window;
+
 static int mouse_preempted = 0;        /* non-zero when XMenu gobbles mouse events */
 
 /* Set the mouse pointer shape according to whether it is in the
@@ -3402,17 +3405,20 @@ dos_rawgetc ()
                                                      mouse_last_y,
                                                      &mouse_area, 0);
              /* A window will be selected only when it is not
-                selected now and last mouse movement event was not in
-                it.  A minubuffer window will be selected iff it is
-                active.  */
-             if (!EQ (mouse_window, selected_window)
+                selected now.  A minubuffer window will be selected
+                iff it is active.  */
+             if (!EQ (mouse_window, last_mouse_window)
+                 && !EQ (mouse_window, selected_window)
                  && (!MINI_WINDOW_P (XWINDOW (mouse_window))
                      || (EQ (mouse_window, minibuf_window)
                          && minibuf_level > 0)))
                {
                  Fselect_window (mouse_window);
                }
+             last_mouse_window = mouse_window;
            }
+         else
+           last_mouse_window = Qnil;
          previous_help_echo = help_echo;
          help_echo = help_echo_object = help_echo_window = Qnil;
          help_echo_pos = -1;