Mercurial > emacs
comparison src/xdisp.c @ 65372:26a30c06dc45
(redisplay_internal): Mark updated frames in new updated_p
member. Remove local `updated' array and associated variables.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Thu, 08 Sep 2005 22:29:49 +0000 |
parents | 5780229616e2 |
children | 0f39e01da672 |
comparison
equal
deleted
inserted
replaced
65371:d2b1170c4ac4 | 65372:26a30c06dc45 |
---|---|
10613 frames. Otherwise do it for selected_window, only. */ | 10613 frames. Otherwise do it for selected_window, only. */ |
10614 | 10614 |
10615 if (consider_all_windows_p) | 10615 if (consider_all_windows_p) |
10616 { | 10616 { |
10617 Lisp_Object tail, frame; | 10617 Lisp_Object tail, frame; |
10618 int i, n = 0, size = 5; | |
10619 struct frame **updated; | |
10620 | 10618 |
10621 FOR_EACH_FRAME (tail, frame) | 10619 FOR_EACH_FRAME (tail, frame) |
10622 size++; | 10620 XFRAME (frame)->updated_p = 0; |
10623 | |
10624 updated = (struct frame **) alloca (size * sizeof *updated); | |
10625 | 10621 |
10626 /* Recompute # windows showing selected buffer. This will be | 10622 /* Recompute # windows showing selected buffer. This will be |
10627 incremented each time such a window is displayed. */ | 10623 incremented each time such a window is displayed. */ |
10628 buffer_shared = 0; | 10624 buffer_shared = 0; |
10629 | 10625 |
10681 #if 0 /* Exiting the loop can leave the wrong value for buffer_shared. */ | 10677 #if 0 /* Exiting the loop can leave the wrong value for buffer_shared. */ |
10682 if (pause) | 10678 if (pause) |
10683 break; | 10679 break; |
10684 #endif | 10680 #endif |
10685 | 10681 |
10686 if (n == size) | 10682 f->updated_p = 1; |
10687 { | |
10688 int nbytes = size * sizeof *updated; | |
10689 struct frame **p = (struct frame **) alloca (2 * nbytes); | |
10690 bcopy (updated, p, nbytes); | |
10691 size *= 2; | |
10692 } | |
10693 | |
10694 updated[n++] = f; | |
10695 } | 10683 } |
10696 } | 10684 } |
10697 } | 10685 } |
10698 | 10686 |
10699 if (!pause) | 10687 if (!pause) |
10700 { | 10688 { |
10701 /* Do the mark_window_display_accurate after all windows have | 10689 /* Do the mark_window_display_accurate after all windows have |
10702 been redisplayed because this call resets flags in buffers | 10690 been redisplayed because this call resets flags in buffers |
10703 which are needed for proper redisplay. */ | 10691 which are needed for proper redisplay. */ |
10704 for (i = 0; i < n; ++i) | 10692 FOR_EACH_FRAME (tail, frame) |
10705 { | 10693 { |
10706 struct frame *f = updated[i]; | 10694 struct frame *f = XFRAME (frame); |
10707 mark_window_display_accurate (f->root_window, 1); | 10695 if (f->updated_p) |
10708 if (frame_up_to_date_hook) | 10696 { |
10709 frame_up_to_date_hook (f); | 10697 mark_window_display_accurate (f->root_window, 1); |
10698 if (frame_up_to_date_hook) | |
10699 frame_up_to_date_hook (f); | |
10700 } | |
10710 } | 10701 } |
10711 } | 10702 } |
10712 } | 10703 } |
10713 else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) | 10704 else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) |
10714 { | 10705 { |