comparison src/xdisp.c @ 19120:1ba82399f2b1

(redisplay_internal): Count number of visible frames instead of number of frames that were redisplayed. (redisplay_window): Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Mon, 04 Aug 1997 03:04:24 +0000
parents e2be10e9bf9d
children bca1fd2554e0
comparison
equal deleted inserted replaced
19119:e772b77b919e 19120:1ba82399f2b1
868 register int pause; 868 register int pause;
869 int must_finish = 0; 869 int must_finish = 0;
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;
877 877
878 #ifdef USE_X_TOOLKIT 878 #ifdef USE_X_TOOLKIT
898 to know if their frames are visible. 898 to know if their frames are visible.
899 See the comment in frame.h for FRAME_SAMPLE_VISIBILITY. */ 899 See the comment in frame.h for FRAME_SAMPLE_VISIBILITY. */
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));
908
909 number_of_visible_frames++;
906 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));
910 } 914 }
968 != !NILP (w->region_showing)) 972 != !NILP (w->region_showing))
969 || (!NILP (w->region_showing) 973 || (!NILP (w->region_showing)
970 && !EQ (w->region_showing, 974 && !EQ (w->region_showing,
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
974 /* This is in case we goto update, below. */
975 number_of_frames_redisplayed = 1;
976 977
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)
980 && !current_buffer->clip_changed 981 && !current_buffer->clip_changed
1146 #endif 1147 #endif
1147 1148
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 {
1155 FRAME_PTR f = XFRAME (frame); 1155 FRAME_PTR f = XFRAME (frame);
1156 if (FRAME_WINDOW_P (f) || f == selected_frame) 1156 if (FRAME_WINDOW_P (f) || f == selected_frame)
1160 we want when we redisplay their windows. */ 1160 we want when we redisplay their windows. */
1161 if (condemn_scroll_bars_hook) 1161 if (condemn_scroll_bars_hook)
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. */
1172 if (judge_scroll_bars_hook) 1169 if (judge_scroll_bars_hook)
1173 (*judge_scroll_bars_hook) (f); 1170 (*judge_scroll_bars_hook) (f);
1177 else if (FRAME_VISIBLE_P (selected_frame)) 1174 else if (FRAME_VISIBLE_P (selected_frame))
1178 { 1175 {
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:
1186 /* Prevent various kinds of signals during display update. 1182 /* Prevent various kinds of signals during display update.
1187 stdio is not robust about handling signals, 1183 stdio is not robust about handling signals,
1343 1339
1344 if (this_is_visible) 1340 if (this_is_visible)
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
1352 /* Change frame size now if a change is pending. */ 1348 /* Change frame size now if a change is pending. */
1353 do_pending_window_change (); 1349 do_pending_window_change ();
3613 && val.vpos) 3609 && val.vpos)
3614 { 3610 {
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
3622 this_line_bufpos = 0; 3618 this_line_bufpos = 0;
3623 } 3619 }