(read_char): If the event was Qselect_window,
authorEli Zaretskii <eliz@gnu.org>
Tue, 2 Apr 2002 15:53:38 +0000 (15:53 +0000)
committerEli Zaretskii <eliz@gnu.org>
Tue, 2 Apr 2002 15:53:38 +0000 (15:53 +0000)
restore timer_idleness_start_time to its previous value.

src/ChangeLog
src/keyboard.c

index c8399ff..061dc2c 100644 (file)
@@ -1,3 +1,11 @@
+2002-04-02  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * keyboard.c (read_char): If the event was Qselect_window,
+       restore timer_idleness_start_time to its previous value.
+
+       * msdos.c (dos_rawgetc): Generate SELECT_WINDOW_EVENTs when
+       required.
+
 2002-04-01  Stefan Monnier  <monnier@cs.yale.edu>
 
        * region-cache.c (new_region_cache): Use BEG.
index 1ec7bfd..3e26339 100644 (file)
@@ -2690,6 +2690,13 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
       last_input_char = c;
       Fcommand_execute (tem, Qnil, Fvector (1, &last_input_char), Qt);
 
+      if (CONSP (c) && EQ (XCAR (c), Qselect_window))
+       /* We stopped being idle for this event; undo that.  This
+          prevents automatic window selection (under
+          autoselect_window_p from acting as a real input event, for
+          example banishing the mouse under mouse-avoidance-mode.  */
+       timer_idleness_start_time = last_idle_start;
+
       /* Resume allowing input from any kboard, if that was true before.  */
       if (!was_locked)
        any_kboard_state ();