summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2021-09-15 15:16:27 +0200
committerMichael Albinus <michael.albinus@gmx.de>2021-09-15 15:16:27 +0200
commitfbd0f194c5425d84c490ef8010deafd47e42a340 (patch)
treebc8c907acac6a1c8f595210b14f1d27d34387cb2
parent4200a527aef34f3f1007b46c7173633449d6936f (diff)
parent773c186914627c6be4ab13fcfa62928675ee94e1 (diff)
downloademacs-fbd0f194c5425d84c490ef8010deafd47e42a340.tar.gz
emacs-fbd0f194c5425d84c490ef8010deafd47e42a340.tar.bz2
emacs-fbd0f194c5425d84c490ef8010deafd47e42a340.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
-rw-r--r--src/frame.h4
-rw-r--r--src/xdisp.c13
-rw-r--r--src/xfaces.c3
3 files changed, 11 insertions, 9 deletions
diff --git a/src/frame.h b/src/frame.h
index a8ad011889d..3dd76805dd2 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -449,8 +449,8 @@ struct frame
/* Non-zero if this frame's faces need to be recomputed. */
bool_bf face_change : 1;
- /* Non-zero if this frame's image cache cannot be freed because the
- frame is in the process of being redisplayed. */
+ /* Non-zero if this frame's image cache and face cache cannot be
+ freed because the frame is in the process of being redisplayed. */
bool_bf inhibit_clear_image_cache : 1;
/* True when new_width or new_height were set by change_frame_size,
diff --git a/src/xdisp.c b/src/xdisp.c
index d30a68570f0..2e72f6b5915 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -16061,12 +16061,13 @@ redisplay_internal (void)
if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
{
- /* Don't allow freeing images for this frame as long
- as the frame's update wasn't completed. This
- prevents crashes when some Lisp that runs from
- the various hooks or font-lock decides to clear
- the frame's image cache, when the images in that
- cache are referenced by the desired matrix. */
+ /* Don't allow freeing images and faces for this
+ frame as long as the frame's update wasn't
+ completed. This prevents crashes when some Lisp
+ that runs from the various hooks or font-lock
+ decides to clear the frame's image cache and face
+ cache, when the images and faces in those caches
+ are referenced by the desired matrix. */
f->inhibit_clear_image_cache = true;
redisplay_windows (FRAME_ROOT_WINDOW (f));
}
diff --git a/src/xfaces.c b/src/xfaces.c
index 2273fb4fe4d..aefed54ebcb 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -674,7 +674,8 @@ clear_face_cache (bool clear_fonts_p)
{
struct frame *f = XFRAME (frame);
if (FRAME_WINDOW_P (f)
- && FRAME_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS)
+ && FRAME_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS
+ && !f->inhibit_clear_image_cache)
{
clear_font_cache (f);
free_all_realized_faces (frame);