texlive[46342] Build/source/texk/web2c/window: mf+toolkit: handle

commits+karl at tug.org commits+karl at tug.org
Wed Jan 17 01:51:27 CET 2018


Revision: 46342
          http://tug.org/svn/texlive?view=revision&revision=46342
Author:   karl
Date:     2018-01-17 01:51:27 +0100 (Wed, 17 Jan 2018)
Log Message:
-----------
mf+toolkit: handle initial expose

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/window/ChangeLog
    trunk/Build/source/texk/web2c/window/x11-Xt.c

Modified: trunk/Build/source/texk/web2c/window/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/window/ChangeLog	2018-01-17 00:33:55 UTC (rev 46341)
+++ trunk/Build/source/texk/web2c/window/ChangeLog	2018-01-17 00:51:27 UTC (rev 46342)
@@ -1,3 +1,8 @@
+2018-01-16  Paul Vojta  <vojta at math.berkeley.edu>
+
+	* x11-Xt.c: attempt to handle initial expose for mf.
+	http://tug.org/pipermail/tex-k/2017-May/002783.html
+
 2015-03-31  Peter Breitenlohner  <peb at mppmu.mpg.de>
 
 	* mftalk.h (new): Moved to here from ../mftalk.h.

Modified: trunk/Build/source/texk/web2c/window/x11-Xt.c
===================================================================
--- trunk/Build/source/texk/web2c/window/x11-Xt.c	2018-01-17 00:33:55 UTC (rev 46341)
+++ trunk/Build/source/texk/web2c/window/x11-Xt.c	2018-01-17 00:51:27 UTC (rev 46342)
@@ -42,7 +42,8 @@
 
 
 /* Don't paint anything until we're mapped.  */
-static Boolean mf_mapped;
+static Boolean mf_mapped = False;
+static Boolean mf_awaiting_expose = True;
 
 #ifdef MF_XT_DEBUG
 static int mf_max_x, mf_max_y;
@@ -150,10 +151,8 @@
      sits in XTMainLoop, if the server supports backing store
      and save unders this will help keep the output looking
      nice.  */
-  xwa.backing_store = Always;
-  xwa.save_under = True;
-  XChangeWindowAttributes (mf_display, mf_window,
-			   CWBackingStore | CWSaveUnder, &xwa);
+  xwa.backing_store = WhenMapped;
+  XChangeWindowAttributes (mf_display, mf_window, CWBackingStore, &xwa);
 
   gcv.background = mf_x11_resources.mf_bg;
   gcv.foreground = mf_x11_resources.mf_fg;
@@ -174,7 +173,14 @@
 void
 mf_x11_updatescreen (void)
 {
+  XEvent event;
+
   mf_events ();
+  while (mf_awaiting_expose)
+    {
+      XtAppNextEvent (mf_app, &event);
+      XtDispatchEvent (&event);
+    }
   mf_redraw ();
 
 #ifdef MF_XT_DEBUG
@@ -327,6 +333,7 @@
 	continue;
 
       mf_redraw ();
+      mf_awaiting_expose = False;
     }
 }
 



More information about the tex-live-commits mailing list