From 5d12f14d6cf06731bf51c74e1a121b71b0297592 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 2 Apr 2002 15:53:38 +0000 Subject: [PATCH] (read_char): If the event was Qselect_window, restore timer_idleness_start_time to its previous value. --- src/ChangeLog | 8 ++++++++ src/keyboard.c | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index c8399ffc594..061dc2cb591 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2002-04-02 Eli Zaretskii + + * 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 * region-cache.c (new_region_cache): Use BEG. diff --git a/src/keyboard.c b/src/keyboard.c index 1ec7bfd4aa3..3e263395fe8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -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 (); -- 2.39.5