# HG changeset patch # User Gerd Moellmann # Date 960497784 0 # Node ID e222720769a03beb2cdc95458afd0f65dec106f7 # Parent eef7f2d614fc7d0506b7265e9bc2a7175e6e7b00 (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. diff -r eef7f2d614fc -r e222720769a0 src/xterm.c --- a/src/xterm.c Thu Jun 08 19:50:42 2000 +0000 +++ b/src/xterm.c Thu Jun 08 20:56:24 2000 +0000 @@ -9609,7 +9609,20 @@ 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))