[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 8275687: Fix a segfault due to failure to realize s
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 8275687: Fix a segfault due to failure to realize some faces |
Date: |
Sat, 25 Mar 2017 09:59:56 -0400 (EDT) |
branch: master
commit 8275687bb908174b84021ee15ecd959733cecb9d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix a segfault due to failure to realize some faces
* src/xdisp.c (redisplay_internal): If the frame becomes garbaged
while redisplaying its windows, redisplay all of its windows
again. (Bug#26097)
(init_iterator): When freeing all realized faces on all frames,
reset the 'face_change' flag of the frame whose window we are
about to iterate.
---
src/xdisp.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/xdisp.c b/src/xdisp.c
index 8266849..3255052 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2716,6 +2716,7 @@ init_iterator (struct it *it, struct window *w,
if (face_change)
{
face_change = false;
+ XFRAME (w->frame)->face_change = 0;
free_all_realized_faces (Qnil);
}
else if (XFRAME (w->frame)->face_change)
@@ -14072,6 +14073,7 @@ redisplay_internal (void)
/* Only GC scrollbars when we redisplay the whole frame. */
= f->redisplay || !REDISPLAY_SOME_P ();
bool f_redisplay_flag = f->redisplay;
+ bool f_garbaged_flag = FRAME_GARBAGED_P (f);
/* Mark all the scroll bars to be removed; we'll redeem
the ones we want when we redisplay their windows. */
if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook)
@@ -14132,6 +14134,15 @@ redisplay_internal (void)
Therefore, we must redisplay this frame. */
if (!f_redisplay_flag && f->redisplay)
goto retry_frame;
+ /* Likewise with the frame's garbaged flag: it can
+ get set inside redisplay_windows if some hook
+ winds up calling adjust_frame_glyphs, for example. */
+ if (!f_garbaged_flag && FRAME_GARBAGED_P (f))
+ {
+ f->garbaged = false;
+ fset_redisplay (f);
+ goto retry_frame;
+ }
/* In some case (e.g., window resize), we notice
only during window updating that the window
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 8275687: Fix a segfault due to failure to realize some faces,
Eli Zaretskii <=