aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-09-30 22:32:14 +0300
committerEli Zaretskii2015-09-30 22:32:14 +0300
commit5c9304ea86b8cfc9d0b6d7769b90bd56e5dd1313 (patch)
tree34a041b7a04364badfb484a41294418b9dccac10 /src
parent82df1878e6559188e688195f992fff10f35035e8 (diff)
downloademacs-5c9304ea86b8cfc9d0b6d7769b90bd56e5dd1313.tar.gz
emacs-5c9304ea86b8cfc9d0b6d7769b90bd56e5dd1313.zip
Disable some display optimizations when frames need redisplay
These optimizations were previously disabled by the windows_or_buffers_changed flag, which now is not set when only some frames need to be redrawn. * src/xdisp.c (redisplay_internal): Redisplay any frame whose 'redisplay' flag is set. (try_window_reusing_current_matrix, try_window_id) (try_cursor_movement): Disable these optimizations when the frame's 'redisplay' flag is set.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 259c36373bf..41b84469fe3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13336,6 +13336,9 @@ redisplay_internal (void)
13336 /* True means redisplay has to redisplay the miniwindow. */ 13336 /* True means redisplay has to redisplay the miniwindow. */
13337 bool update_miniwindow_p = false; 13337 bool update_miniwindow_p = false;
13338 13338
13339 /* True means we need to redraw frames whose 'redisplay' bit is set. */
13340 bool consider_some_frames_p = false;
13341
13339 TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p)); 13342 TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p));
13340 13343
13341 /* No redisplay if running in batch mode or frame is not yet fully 13344 /* No redisplay if running in batch mode or frame is not yet fully
@@ -13555,6 +13558,7 @@ redisplay_internal (void)
13555 && !FRAME_OBSCURED_P (XFRAME (w->frame)) 13558 && !FRAME_OBSCURED_P (XFRAME (w->frame))
13556 && !XFRAME (w->frame)->cursor_type_changed 13559 && !XFRAME (w->frame)->cursor_type_changed
13557 && !XFRAME (w->frame)->face_change 13560 && !XFRAME (w->frame)->face_change
13561 && !XFRAME (w->frame)->redisplay
13558 /* Make sure recorded data applies to current buffer, etc. */ 13562 /* Make sure recorded data applies to current buffer, etc. */
13559 && this_line_buffer == current_buffer 13563 && this_line_buffer == current_buffer
13560 && match_p 13564 && match_p
@@ -13750,13 +13754,29 @@ redisplay_internal (void)
13750#endif 13754#endif
13751 13755
13752 /* Build desired matrices, and update the display. If 13756 /* Build desired matrices, and update the display. If
13753 consider_all_windows_p, do it for all windows on all frames. 13757 consider_all_windows_p, do it for all windows on all frames. If
13754 Otherwise do it for selected_window, only. */ 13758 a frame's 'redisplay' flag is set, do it for all windows on each
13759 such frame. Otherwise do it for selected_window, only. */
13755 13760
13756 if (consider_all_windows_p) 13761 if (!consider_all_windows_p)
13757 { 13762 {
13758 FOR_EACH_FRAME (tail, frame) 13763 FOR_EACH_FRAME (tail, frame)
13759 XFRAME (frame)->updated_p = false; 13764 {
13765 if (XFRAME (frame)->redisplay && XFRAME (frame) != sf)
13766 {
13767 consider_some_frames_p = true;
13768 break;
13769 }
13770 }
13771 }
13772
13773 if (consider_all_windows_p || consider_some_frames_p)
13774 {
13775 FOR_EACH_FRAME (tail, frame)
13776 {
13777 if (XFRAME (frame)->redisplay || consider_all_windows_p)
13778 XFRAME (frame)->updated_p = false;
13779 }
13760 13780
13761 propagate_buffer_redisplay (); 13781 propagate_buffer_redisplay ();
13762 13782
@@ -13770,6 +13790,9 @@ redisplay_internal (void)
13770 && !EQ (FRAME_TTY (f)->top_frame, frame)) 13790 && !EQ (FRAME_TTY (f)->top_frame, frame))
13771 continue; 13791 continue;
13772 13792
13793 if (!consider_all_windows_p && !f->redisplay)
13794 continue;
13795
13773 retry_frame: 13796 retry_frame:
13774 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf) 13797 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
13775 { 13798 {
@@ -15415,6 +15438,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp,
15415 && !update_mode_lines 15438 && !update_mode_lines
15416 && !windows_or_buffers_changed 15439 && !windows_or_buffers_changed
15417 && !f->cursor_type_changed 15440 && !f->cursor_type_changed
15441 && !f->redisplay
15418 && NILP (Vshow_trailing_whitespace) 15442 && NILP (Vshow_trailing_whitespace)
15419 /* This code is not used for mini-buffer for the sake of the case 15443 /* This code is not used for mini-buffer for the sake of the case
15420 of redisplaying to replace an echo area message; since in 15444 of redisplaying to replace an echo area message; since in
@@ -17025,6 +17049,7 @@ try_window_reusing_current_matrix (struct window *w)
17025 /* Don't try to reuse the display if windows have been split 17049 /* Don't try to reuse the display if windows have been split
17026 or such. */ 17050 or such. */
17027 || windows_or_buffers_changed 17051 || windows_or_buffers_changed
17052 || f->redisplay
17028 || f->cursor_type_changed) 17053 || f->cursor_type_changed)
17029 return false; 17054 return false;
17030 17055
@@ -17802,7 +17827,7 @@ try_window_id (struct window *w)
17802 GIVE_UP (1); 17827 GIVE_UP (1);
17803 17828
17804 /* This flag is used to prevent redisplay optimizations. */ 17829 /* This flag is used to prevent redisplay optimizations. */
17805 if (windows_or_buffers_changed || f->cursor_type_changed) 17830 if (windows_or_buffers_changed || f->cursor_type_changed || f->redisplay)
17806 GIVE_UP (2); 17831 GIVE_UP (2);
17807 17832
17808 /* This function's optimizations cannot be used if overlays have 17833 /* This function's optimizations cannot be used if overlays have