]> git.eshelyaron.com Git - emacs.git/commitdiff
(XTread_socket) <FocusIn>: Queue a FOCUS_IN_EVENT which
authorGerd Moellmann <gerd@gnu.org>
Thu, 8 Jun 2000 20:56:24 +0000 (20:56 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 8 Jun 2000 20:56:24 +0000 (20:56 +0000)
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

index 295ee422b1eb42b017d47a81fd7e49c1fbb7f030..eea9b76d19142500af867b3a8957366d8fdd4aa5 100644 (file)
@@ -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))