aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2015-09-08 10:25:59 -0400
committerStefan Monnier2015-09-08 10:25:59 -0400
commitbc26305473ed59fe75b6efc3ba1c967f54c4c292 (patch)
tree7a2d283d327b717dea60cf43689c050b841897e0 /src
parent645c8597e7f9fbc90ffe227d2be8ce383b0777ae (diff)
downloademacs-bc26305473ed59fe75b6efc3ba1c967f54c4c292.tar.gz
emacs-bc26305473ed59fe75b6efc3ba1c967f54c4c292.zip
Remove a few simple cases of global redisplay
* src/dispnew.c (redraw_frame): Don't redisplay all frames. * src/xdisp.c (echo_area_display): Set the frame's `redisplay' bit rather than returning a "resized_p" boolean. (redisplay_internal): Adjust call accordingly. * src/xfaces.c (free_realized_faces): Don't redisplay all frames. (free_all_realized_faces): Set windows_or_buffers_changed so as to ease tracking of this undesirable situation.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c2
-rw-r--r--src/xdisp.c39
-rw-r--r--src/xfaces.c3
3 files changed, 22 insertions, 22 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 18afe50dd9b..645d4106e9e 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3004,7 +3004,7 @@ redraw_frame (struct frame *f)
3004 clear_frame (f); 3004 clear_frame (f);
3005 clear_current_matrices (f); 3005 clear_current_matrices (f);
3006 update_end (f); 3006 update_end (f);
3007 windows_or_buffers_changed = 13; 3007 fset_redisplay (f);
3008 /* Mark all windows as inaccurate, so that every window will have 3008 /* Mark all windows as inaccurate, so that every window will have
3009 its redisplay done. */ 3009 its redisplay done. */
3010 mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0); 3010 mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0);
diff --git a/src/xdisp.c b/src/xdisp.c
index 82931b88e1c..6b165af1eb7 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -768,7 +768,7 @@ static void push_it (struct it *, struct text_pos *);
768static void iterate_out_of_display_property (struct it *); 768static void iterate_out_of_display_property (struct it *);
769static void pop_it (struct it *); 769static void pop_it (struct it *);
770static void redisplay_internal (void); 770static void redisplay_internal (void);
771static bool echo_area_display (bool); 771static void echo_area_display (bool);
772static void redisplay_windows (Lisp_Object); 772static void redisplay_windows (Lisp_Object);
773static void redisplay_window (Lisp_Object, bool); 773static void redisplay_window (Lisp_Object, bool);
774static Lisp_Object redisplay_window_error (Lisp_Object); 774static Lisp_Object redisplay_window_error (Lisp_Object);
@@ -11119,11 +11119,11 @@ clear_garbaged_frames (void)
11119} 11119}
11120 11120
11121 11121
11122/* Redisplay the echo area of the selected frame. If UPDATE_FRAME_P, 11122/* Redisplay the echo area of the selected frame. If UPDATE_FRAME_P, update
11123 update selected_frame. Value is true if the mini-windows height 11123 selected_frame. Value is the affected frame if the mini-windows height has
11124 has been changed. */ 11124 been changed. */
11125 11125
11126static bool 11126static void
11127echo_area_display (bool update_frame_p) 11127echo_area_display (bool update_frame_p)
11128{ 11128{
11129 Lisp_Object mini_window; 11129 Lisp_Object mini_window;
@@ -11138,14 +11138,14 @@ echo_area_display (bool update_frame_p)
11138 11138
11139 /* Don't display if frame is invisible or not yet initialized. */ 11139 /* Don't display if frame is invisible or not yet initialized. */
11140 if (!FRAME_VISIBLE_P (f) || !f->glyphs_initialized_p) 11140 if (!FRAME_VISIBLE_P (f) || !f->glyphs_initialized_p)
11141 return false; 11141 return;
11142 11142
11143#ifdef HAVE_WINDOW_SYSTEM 11143#ifdef HAVE_WINDOW_SYSTEM
11144 /* When Emacs starts, selected_frame may be the initial terminal 11144 /* When Emacs starts, selected_frame may be the initial terminal
11145 frame. If we let this through, a message would be displayed on 11145 frame. If we let this through, a message would be displayed on
11146 the terminal. */ 11146 the terminal. */
11147 if (FRAME_INITIAL_P (XFRAME (selected_frame))) 11147 if (FRAME_INITIAL_P (XFRAME (selected_frame)))
11148 return false; 11148 return;
11149#endif /* HAVE_WINDOW_SYSTEM */ 11149#endif /* HAVE_WINDOW_SYSTEM */
11150 11150
11151 /* Redraw garbaged frames. */ 11151 /* Redraw garbaged frames. */
@@ -11183,7 +11183,7 @@ echo_area_display (bool update_frame_p)
11183 pending input. */ 11183 pending input. */
11184 ptrdiff_t count = SPECPDL_INDEX (); 11184 ptrdiff_t count = SPECPDL_INDEX ();
11185 specbind (Qredisplay_dont_pause, Qt); 11185 specbind (Qredisplay_dont_pause, Qt);
11186 windows_or_buffers_changed = 44; 11186 fset_redisplay (f);
11187 redisplay_internal (); 11187 redisplay_internal ();
11188 unbind_to (count, Qnil); 11188 unbind_to (count, Qnil);
11189 } 11189 }
@@ -11219,7 +11219,16 @@ echo_area_display (bool update_frame_p)
11219 if (EQ (mini_window, selected_window)) 11219 if (EQ (mini_window, selected_window))
11220 CHARPOS (this_line_start_pos) = 0; 11220 CHARPOS (this_line_start_pos) = 0;
11221 11221
11222 return window_height_changed_p; 11222 if (window_height_changed_p)
11223 {
11224 fset_redisplay (f);
11225
11226 /* If window configuration was changed, frames may have been
11227 marked garbaged. Clear them or we will experience
11228 surprises wrt scrolling.
11229 FIXME: How/why/when? */
11230 clear_garbaged_frames ();
11231 }
11223} 11232}
11224 11233
11225/* True if W's buffer was changed but not saved. */ 11234/* True if W's buffer was changed but not saved. */
@@ -13445,7 +13454,7 @@ redisplay_internal (void)
13445 echo-area doesn't show through. */ 13454 echo-area doesn't show through. */
13446 && !MINI_WINDOW_P (XWINDOW (selected_window)))) 13455 && !MINI_WINDOW_P (XWINDOW (selected_window))))
13447 { 13456 {
13448 bool window_height_changed_p = echo_area_display (false); 13457 echo_area_display (false);
13449 13458
13450 if (message_cleared_p) 13459 if (message_cleared_p)
13451 update_miniwindow_p = true; 13460 update_miniwindow_p = true;
@@ -13458,16 +13467,6 @@ redisplay_internal (void)
13458 the echo area. */ 13467 the echo area. */
13459 if (!display_last_displayed_message_p) 13468 if (!display_last_displayed_message_p)
13460 message_cleared_p = false; 13469 message_cleared_p = false;
13461
13462 if (window_height_changed_p)
13463 {
13464 windows_or_buffers_changed = 50;
13465
13466 /* If window configuration was changed, frames may have been
13467 marked garbaged. Clear them or we will experience
13468 surprises wrt scrolling. */
13469 clear_garbaged_frames ();
13470 }
13471 } 13470 }
13472 else if (EQ (selected_window, minibuf_window) 13471 else if (EQ (selected_window, minibuf_window)
13473 && (current_buffer->clip_changed || window_outdated (w)) 13472 && (current_buffer->clip_changed || window_outdated (w))
diff --git a/src/xfaces.c b/src/xfaces.c
index 03032496381..a4f1aa89f71 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4186,7 +4186,7 @@ free_realized_faces (struct face_cache *c)
4186 if (WINDOWP (f->root_window)) 4186 if (WINDOWP (f->root_window))
4187 { 4187 {
4188 clear_current_matrices (f); 4188 clear_current_matrices (f);
4189 windows_or_buffers_changed = 58; 4189 fset_redisplay (f);
4190 } 4190 }
4191 4191
4192 unblock_input (); 4192 unblock_input ();
@@ -4206,6 +4206,7 @@ free_all_realized_faces (Lisp_Object frame)
4206 Lisp_Object rest; 4206 Lisp_Object rest;
4207 FOR_EACH_FRAME (rest, frame) 4207 FOR_EACH_FRAME (rest, frame)
4208 free_realized_faces (FRAME_FACE_CACHE (XFRAME (frame))); 4208 free_realized_faces (FRAME_FACE_CACHE (XFRAME (frame)));
4209 windows_or_buffers_changed = 58;
4209 } 4210 }
4210 else 4211 else
4211 free_realized_faces (FRAME_FACE_CACHE (XFRAME (frame))); 4212 free_realized_faces (FRAME_FACE_CACHE (XFRAME (frame)));