diff options
| author | Eli Zaretskii | 2017-03-26 21:36:52 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-03-26 21:36:52 +0300 |
| commit | a749b55d8ee530797ccff693ad302541257d0415 (patch) | |
| tree | 23683feac4b31a1f011b6bb5ab58c58da3196339 /src | |
| parent | 8884baf3c8919abd67071296ed4784739bf94c00 (diff) | |
| download | emacs-a749b55d8ee530797ccff693ad302541257d0415.tar.gz emacs-a749b55d8ee530797ccff693ad302541257d0415.zip | |
Fix redisplay glitches due to recent change in redisplay_internal
* src/xdisp.c (redisplay_internal): A better fix for bug#26097.
See http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00695.html
for the problems caused by the original fix.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 32550523bc3..af086d17eb8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -14073,7 +14073,6 @@ redisplay_internal (void) | |||
| 14073 | /* Only GC scrollbars when we redisplay the whole frame. */ | 14073 | /* Only GC scrollbars when we redisplay the whole frame. */ |
| 14074 | = f->redisplay || !REDISPLAY_SOME_P (); | 14074 | = f->redisplay || !REDISPLAY_SOME_P (); |
| 14075 | bool f_redisplay_flag = f->redisplay; | 14075 | bool f_redisplay_flag = f->redisplay; |
| 14076 | bool f_garbaged_flag = FRAME_GARBAGED_P (f); | ||
| 14077 | /* Mark all the scroll bars to be removed; we'll redeem | 14076 | /* Mark all the scroll bars to be removed; we'll redeem |
| 14078 | the ones we want when we redisplay their windows. */ | 14077 | the ones we want when we redisplay their windows. */ |
| 14079 | if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook) | 14078 | if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook) |
| @@ -14134,30 +14133,16 @@ redisplay_internal (void) | |||
| 14134 | Therefore, we must redisplay this frame. */ | 14133 | Therefore, we must redisplay this frame. */ |
| 14135 | if (!f_redisplay_flag && f->redisplay) | 14134 | if (!f_redisplay_flag && f->redisplay) |
| 14136 | goto retry_frame; | 14135 | goto retry_frame; |
| 14137 | /* Likewise with the frame's garbaged flag: it can | ||
| 14138 | get set inside redisplay_windows if some hook | ||
| 14139 | winds up calling adjust_frame_glyphs, for example. */ | ||
| 14140 | if (!f_garbaged_flag && FRAME_GARBAGED_P (f)) | ||
| 14141 | { | ||
| 14142 | f->garbaged = false; | ||
| 14143 | fset_redisplay (f); | ||
| 14144 | goto retry_frame; | ||
| 14145 | } | ||
| 14146 | |||
| 14147 | /* In some case (e.g., window resize), we notice | 14136 | /* In some case (e.g., window resize), we notice |
| 14148 | only during window updating that the window | 14137 | only during window updating that the window |
| 14149 | content changed unpredictably (e.g., a GTK | 14138 | content changed unpredictably (e.g., a GTK |
| 14150 | scrollbar moved) and that our previous estimation | 14139 | scrollbar moved, or some Lisp hook that winds up |
| 14151 | of the frame content was garbage. We have to | 14140 | calling adjust_frame_glyphs) and that our |
| 14152 | start over. These cases should be rare, so going | 14141 | previous estimation of the frame content was |
| 14153 | all the way back to the top of redisplay should | 14142 | garbage. We have to start over. These cases |
| 14154 | be good enough. | 14143 | should be rare, so going all the way back to the |
| 14155 | 14144 | top of redisplay should be good enough. */ | |
| 14156 | Why FRAME_WINDOW_P? See | 14145 | if (FRAME_GARBAGED_P (f)) |
| 14157 | https://lists.gnu.org/archive/html/emacs-devel/2016-10/msg00957.html | ||
| 14158 | |||
| 14159 | */ | ||
| 14160 | if (FRAME_GARBAGED_P (f) && FRAME_WINDOW_P (f)) | ||
| 14161 | goto retry; | 14146 | goto retry; |
| 14162 | 14147 | ||
| 14163 | /* Prevent various kinds of signals during display | 14148 | /* Prevent various kinds of signals during display |