changeset 29512:e222720769a0

(XTread_socket) <FocusIn>: 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.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 08 Jun 2000 20:56:24 +0000
parents eef7f2d614fc
children dfb72889ff52
files src/xterm.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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))