From: Po Lu Date: Sat, 5 Mar 2022 03:13:37 +0000 (+0800) Subject: Flush default GC before using it in functions that accept a GContext X-Git-Tag: emacs-29.0.90~2010 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3c5aad0b8b88fd763e46c41a2fab87c9dc206e97;p=emacs.git 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. --- 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)) {