changeset 7959:224440646fa7

(make_frame_visible): At end, wait till Emacs sees frame is visible.
author Richard M. Stallman <rms@gnu.org>
date Sat, 18 Jun 1994 18:57:39 +0000
parents 1398a59935e7
children cf5e53c5089e
files src/xterm.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Sat Jun 18 17:54:50 1994 +0000
+++ b/src/xterm.c	Sat Jun 18 18:57:39 1994 +0000
@@ -5567,6 +5567,17 @@
   XFlushQueue ();
 
   UNBLOCK_INPUT;
+
+  /* Synchronize to ensure Emacs knows the frame is visible
+     before we do anything else.  We do this loop with input not blocked
+     so that incoming events are handled.  */
+  {
+    Lisp_Object frame;
+    XSET (frame, Lisp_Frame, f);
+    while (! f->async_visible)
+      x_sync (frame);
+    FRAME_SAMPLE_VISIBILITY (f);
+  }
 }
 
 /* Change from mapped state to withdrawn state. */