summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-17 00:51:27 +0000
committerKarl Berry <karl@freefriends.org>2018-01-17 00:51:27 +0000
commita9f3323d7b51bc2dc022e421d134cac02a665272 (patch)
tree8700410a22473b7409c2d848aa8845b9db5f2d45
parent3814fe62e5aeab19e2da1368a8d176f38335be7e (diff)
mf+toolkit: handle initial expose
git-svn-id: svn://tug.org/texlive/trunk@46342 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/window/ChangeLog5
-rw-r--r--Build/source/texk/web2c/window/x11-Xt.c17
2 files changed, 17 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/window/ChangeLog b/Build/source/texk/web2c/window/ChangeLog
index cc36fd55752..ed6d0165dd2 100644
--- a/Build/source/texk/web2c/window/ChangeLog
+++ b/Build/source/texk/web2c/window/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-16 Paul Vojta <vojta@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@mppmu.mpg.de>
* mftalk.h (new): Moved to here from ../mftalk.h.
diff --git a/Build/source/texk/web2c/window/x11-Xt.c b/Build/source/texk/web2c/window/x11-Xt.c
index 64d4f86e639..b7c9c25c405 100644
--- a/Build/source/texk/web2c/window/x11-Xt.c
+++ b/Build/source/texk/web2c/window/x11-Xt.c
@@ -42,7 +42,8 @@ static mf_resources_struct mf_x11_resources;
/* 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 @@ mf_x11_initscreen (void)
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 @@ mf_x11_initscreen (void)
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 @@ mf_repaint(Widget w, XtPointer data, XEvent *ev)
continue;
mf_redraw ();
+ mf_awaiting_expose = False;
}
}