diff options
| author | Richard M. Stallman | 1997-08-04 03:04:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-04 03:04:24 +0000 |
| commit | 89819bddb637d126d0d4506e1ddc26a2ed44e0e0 (patch) | |
| tree | 8ae28650cd80118b070692202a6d7f5c14ff6f7e /src | |
| parent | 5d8c798306233ca15e6bf2ce924f219cddeecace (diff) | |
| download | emacs-89819bddb637d126d0d4506e1ddc26a2ed44e0e0.tar.gz emacs-89819bddb637d126d0d4506e1ddc26a2ed44e0e0.zip | |
(redisplay_internal): Count number of visible frames
instead of number of frames that were redisplayed.
(redisplay_window): Fix previous change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 2dbadcaba62..d088023e6b5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -870,7 +870,7 @@ redisplay_internal (preserve_echo_area) | |||
| 870 | int all_windows; | 870 | int all_windows; |
| 871 | register int tlbufpos, tlendpos; | 871 | register int tlbufpos, tlendpos; |
| 872 | struct position pos; | 872 | struct position pos; |
| 873 | int number_of_frames_redisplayed; | 873 | int number_of_visible_frames; |
| 874 | 874 | ||
| 875 | if (noninteractive) | 875 | if (noninteractive) |
| 876 | return; | 876 | return; |
| @@ -900,10 +900,14 @@ redisplay_internal (preserve_echo_area) | |||
| 900 | { | 900 | { |
| 901 | Lisp_Object tail, frame; | 901 | Lisp_Object tail, frame; |
| 902 | 902 | ||
| 903 | number_of_visible_frames = 0; | ||
| 904 | |||
| 903 | FOR_EACH_FRAME (tail, frame) | 905 | FOR_EACH_FRAME (tail, frame) |
| 904 | { | 906 | { |
| 905 | FRAME_SAMPLE_VISIBILITY (XFRAME (frame)); | 907 | FRAME_SAMPLE_VISIBILITY (XFRAME (frame)); |
| 906 | 908 | ||
| 909 | number_of_visible_frames++; | ||
| 910 | |||
| 907 | /* Clear out all the display lines in which we will generate the | 911 | /* Clear out all the display lines in which we will generate the |
| 908 | glyphs to display. */ | 912 | glyphs to display. */ |
| 909 | init_desired_glyphs (XFRAME (frame)); | 913 | init_desired_glyphs (XFRAME (frame)); |
| @@ -971,9 +975,6 @@ redisplay_internal (preserve_echo_area) | |||
| 971 | Fmarker_position (XBUFFER (w->buffer)->mark)))) | 975 | Fmarker_position (XBUFFER (w->buffer)->mark)))) |
| 972 | this_line_bufpos = -1; | 976 | this_line_bufpos = -1; |
| 973 | 977 | ||
| 974 | /* This is in case we goto update, below. */ | ||
| 975 | number_of_frames_redisplayed = 1; | ||
| 976 | |||
| 977 | tlbufpos = this_line_bufpos; | 978 | tlbufpos = this_line_bufpos; |
| 978 | tlendpos = this_line_endpos; | 979 | tlendpos = this_line_endpos; |
| 979 | if (!all_windows && tlbufpos > 0 && NILP (w->update_mode_line) | 980 | if (!all_windows && tlbufpos > 0 && NILP (w->update_mode_line) |
| @@ -1148,7 +1149,6 @@ redisplay_internal (preserve_echo_area) | |||
| 1148 | /* Recompute # windows showing selected buffer. | 1149 | /* Recompute # windows showing selected buffer. |
| 1149 | This will be incremented each time such a window is displayed. */ | 1150 | This will be incremented each time such a window is displayed. */ |
| 1150 | buffer_shared = 0; | 1151 | buffer_shared = 0; |
| 1151 | number_of_frames_redisplayed = 0; | ||
| 1152 | 1152 | ||
| 1153 | FOR_EACH_FRAME (tail, frame) | 1153 | FOR_EACH_FRAME (tail, frame) |
| 1154 | { | 1154 | { |
| @@ -1162,10 +1162,7 @@ redisplay_internal (preserve_echo_area) | |||
| 1162 | (*condemn_scroll_bars_hook) (f); | 1162 | (*condemn_scroll_bars_hook) (f); |
| 1163 | 1163 | ||
| 1164 | if (FRAME_VISIBLE_P (f)) | 1164 | if (FRAME_VISIBLE_P (f)) |
| 1165 | { | 1165 | redisplay_windows (FRAME_ROOT_WINDOW (f), preserve_echo_area); |
| 1166 | redisplay_windows (FRAME_ROOT_WINDOW (f), preserve_echo_area); | ||
| 1167 | number_of_frames_redisplayed++; | ||
| 1168 | } | ||
| 1169 | 1166 | ||
| 1170 | /* Any scroll bars which redisplay_windows should have nuked | 1167 | /* Any scroll bars which redisplay_windows should have nuked |
| 1171 | should now go away. */ | 1168 | should now go away. */ |
| @@ -1179,7 +1176,6 @@ redisplay_internal (preserve_echo_area) | |||
| 1179 | redisplay_window (selected_window, 1, preserve_echo_area); | 1176 | redisplay_window (selected_window, 1, preserve_echo_area); |
| 1180 | if (!WINDOW_FULL_WIDTH_P (w)) | 1177 | if (!WINDOW_FULL_WIDTH_P (w)) |
| 1181 | preserve_other_columns (w); | 1178 | preserve_other_columns (w); |
| 1182 | number_of_frames_redisplayed = 1; | ||
| 1183 | } | 1179 | } |
| 1184 | 1180 | ||
| 1185 | update: | 1181 | update: |
| @@ -1345,7 +1341,7 @@ update: | |||
| 1345 | new_count++; | 1341 | new_count++; |
| 1346 | } | 1342 | } |
| 1347 | 1343 | ||
| 1348 | if (new_count != number_of_frames_redisplayed) | 1344 | if (new_count != number_of_visible_frames) |
| 1349 | windows_or_buffers_changed++; | 1345 | windows_or_buffers_changed++; |
| 1350 | } | 1346 | } |
| 1351 | 1347 | ||
| @@ -3615,7 +3611,7 @@ display_text_line (w, start, vpos, hpos, taboffset, ovstr_done) | |||
| 3615 | this_line_bufpos = start; | 3611 | this_line_bufpos = start; |
| 3616 | this_line_buffer = current_buffer; | 3612 | this_line_buffer = current_buffer; |
| 3617 | this_line_vpos = cursor_vpos; | 3613 | this_line_vpos = cursor_vpos; |
| 3618 | this_line_start_hpos = hpos; | 3614 | this_line_start_hpos = hpos - WINDOW_LEFT_MARGIN (w); |
| 3619 | this_line_endpos = Z - lastpos; | 3615 | this_line_endpos = Z - lastpos; |
| 3620 | } | 3616 | } |
| 3621 | else | 3617 | else |