]> git.eshelyaron.com Git - emacs.git/commitdiff
* dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 8 Oct 2013 14:56:15 +0000 (18:56 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Tue, 8 Oct 2013 14:56:15 +0000 (18:56 +0400)
(redraw_frame, update_frame): Adjust users.
* dispextern.h (set_window_update_flags): Adjust prototype.
* xdisp.c (redisplay_internal): When updating all frames with zero
windows_or_buffers_changed, assume that only the windows that shows
current buffer should be really updated.

src/ChangeLog
src/dispextern.h
src/dispnew.c
src/xdisp.c

index 06733a2455fd7fef3aaf0ff2a5952bcadf214efc..fc2f7a9d57c22e588685b0779d6ec529ef383a2e 100644 (file)
@@ -1,3 +1,12 @@
+2013-10-08  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * dispnew.c (set_window_update_flags): Add buffer arg.  Adjust comment.
+       (redraw_frame, update_frame): Adjust users.
+       * dispextern.h (set_window_update_flags): Adjust prototype.
+       * xdisp.c (redisplay_internal): When updating all frames with zero
+       windows_or_buffers_changed, assume that only the windows that shows
+       current buffer should be really updated.
+
 2013-10-08  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Do not allocate huge temporary memory areas and objects while encoding
index 5ddc177bcf0da841b1c9375bd2f7eead43d6f79b..2f6b730865d29f70a4af01f5187f92488b76309a 100644 (file)
@@ -3460,7 +3460,7 @@ void blank_row (struct window *, struct glyph_row *, int);
 void clear_glyph_matrix_rows (struct glyph_matrix *, int, int);
 void clear_glyph_row (struct glyph_row *);
 void prepare_desired_row (struct glyph_row *);
-void set_window_update_flags (struct window *, bool);
+void set_window_update_flags (struct window *, struct buffer *, bool);
 void update_single_window (struct window *, bool);
 void do_pending_window_change (bool);
 void change_frame_size (struct frame *, int, int, bool, bool, bool);
index 27167f4e1e466e7f57597bfc863e051e97a3d3c6..8507a330a9239d4a675747a8b08b99be48150358 100644 (file)
@@ -2910,7 +2910,7 @@ redraw_frame (struct frame *f)
   /* Mark all windows as inaccurate, so that every window will have
      its redisplay done.  */
   mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0);
-  set_window_update_flags (XWINDOW (FRAME_ROOT_WINDOW (f)), 1);
+  set_window_update_flags (XWINDOW (FRAME_ROOT_WINDOW (f)), NULL, 1);
   f->garbaged = 0;
 }
 
@@ -3041,7 +3041,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
 
  do_pause:
   /* Reset flags indicating that a window should be updated.  */
-  set_window_update_flags (root_window, 0);
+  set_window_update_flags (root_window, NULL, 0);
 
   display_completed = !paused_p;
   return paused_p;
@@ -3820,17 +3820,18 @@ set_window_cursor_after_update (struct window *w)
 }
 
 
-/* Set WINDOW->must_be_updated_p to ON_P for all windows in the window
-   tree rooted at W.  */
+/* If B is NULL, set WINDOW->must_be_updated_p to ON_P for all windows in
+   the window tree rooted at W.  Otherwise set WINDOW->must_be_updated_p
+   to ON_P only for windows that displays B.  */
 
 void
-set_window_update_flags (struct window *w, bool on_p)
+set_window_update_flags (struct window *w, struct buffer *b, bool on_p)
 {
   while (w)
     {
       if (WINDOWP (w->contents))
-       set_window_update_flags (XWINDOW (w->contents), on_p);
-      else
+       set_window_update_flags (XWINDOW (w->contents), b, on_p);
+      else if (!(b && b != XBUFFER (w->contents)))
        w->must_be_updated_p = on_p;
 
       w = NILP (w->next) ? 0 : XWINDOW (w->next);
index b01979c3dfd5f1c8eaf02adaeb5ca88a5b5e8ea1..5d5ce12d09604902ff871c0d38c1560abdc2ef6f 100644 (file)
@@ -13437,8 +13437,13 @@ redisplay_internal (void)
                    unrequest_sigio ();
                  STOP_POLLING;
 
-                 /* Update the display.  */
-                 set_window_update_flags (XWINDOW (f->root_window), 1);
+                 /* Mark windows on frame F to update.  If we decide to
+                    update all frames but windows_or_buffers_changed is
+                    zero, we assume that only the windows that shows
+                    current buffer should be really updated.  */
+                 set_window_update_flags
+                   (XWINDOW (f->root_window),
+                    (windows_or_buffers_changed ? NULL : current_buffer), 1);
                  pending |= update_frame (f, 0, 0);
                  f->cursor_type_changed = 0;
                  f->updated_p = 1;