From eb72635f8a6b56026a3baa4b915e39afe85a7b9f Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 8 Jun 2000 20:56:24 +0000 Subject: [PATCH] (XTread_socket) : Queue a FOCUS_IN_EVENT which will be translated to a switch-frame event in when reading the event queue. This is necessary because Emacs otherwise won't perform a switch-frame to a new frame until some other event, for example a keystroke event, forces it to do so. This has various effects, one visible being that the cursor of a frame created with C-x 5 2 or switched to with a window manager key binding like A-TAB stays hollow because selected_window isn't on the newly focused frame until the switch-frame is performed. --- src/xterm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 295ee422b1e..eea9b76d191 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9609,7 +9609,20 @@ XTread_socket (sd, bufp, numchars, expected) if (event.xfocus.detail != NotifyPointer) dpyinfo->x_focus_event_frame = f; if (f) - x_new_focus_frame (dpyinfo, f); + { + x_new_focus_frame (dpyinfo, f); + + /* Don't stop displaying the initial startup message + for a switch-frame event we don't need. */ + if (GC_NILP (Vterminal_frame) + && GC_CONSP (Vframe_list) + && !GC_NILP (XCDR (Vframe_list))) + { + bufp->kind = FOCUS_IN_EVENT; + XSETFRAME (bufp->frame_or_window, f); + ++bufp, ++count, --numchars; + } + } #ifdef HAVE_X_I18N if (f && FRAME_XIC (f)) -- 2.39.2