From 3c5aad0b8b88fd763e46c41a2fab87c9dc206e97 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 5 Mar 2022 11:13:37 +0800 Subject: [PATCH] Flush default GC before using it in functions that accept a GContext * src/xterm.c (x_scroll_run): Flush normal_gc, since some of the following code depends on it being up-to-date. --- src/xterm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index 55224d93c9b..5f8e804c62a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5983,6 +5983,12 @@ x_scroll_run (struct window *w, struct run *run) } #endif + /* Some of the following code depends on `normal_gc' being + up-to-date on the X server, but doesn't call a routine that will + flush it first. So do this ourselves instead. */ + XFlushGC (FRAME_X_DISPLAY (f), + f->output_data.x->normal_gc); + #ifdef USE_CAIRO if (FRAME_CR_CONTEXT (f)) { -- 2.39.5