]> git.eshelyaron.com Git - emacs.git/commitdiff
Flush default GC before using it in functions that accept a GContext
authorPo Lu <luangruo@yahoo.com>
Sat, 5 Mar 2022 03:13:37 +0000 (11:13 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 5 Mar 2022 03:13:37 +0000 (11:13 +0800)
* 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

index 55224d93c9bc286538d5fdb6fd753292915f53bf..5f8e804c62a7637aa4898796ba85d00a69c7fe75 100644 (file)
@@ -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))
     {