aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-08-25 13:21:46 +0000
committerGerd Moellmann2000-08-25 13:21:46 +0000
commitbd9d0f3f80fb60a60efc30e1a6dc798f7d49a7a8 (patch)
tree7d093c48e36834627646d1c647b32493e44daf8f /src
parent84c58e1e6c77437e3bd74493a38bad933e3e937f (diff)
downloademacs-bd9d0f3f80fb60a60efc30e1a6dc798f7d49a7a8.tar.gz
emacs-bd9d0f3f80fb60a60efc30e1a6dc798f7d49a7a8.zip
(redisplay_internal): If considering all windows on all
frames, update the display for each frame as soon as possible, instead of first building all desired matrices for all frames, and then updating them all. (try_cursor_movement): Handle case that last_cursor.vpos is -1.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/xdisp.c148
2 files changed, 69 insertions, 87 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 43a89687ecc..34c181dc3c2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12000-08-25 Gerd Moellmann <gerd@gnu.org>
2
3 * xdisp.c (redisplay_internal): If considering all windows on all
4 frames, update the display for each frame as soon as possible,
5 instead of first building all desired matrices for all frames, and
6 then updating them all.
7 (try_cursor_movement): Handle case that last_cursor.vpos is -1.
8
12000-08-24 Gerd Moellmann <gerd@gnu.org> 92000-08-24 Gerd Moellmann <gerd@gnu.org>
2 10
3 * bytecode.c (mark_byte_stack): Add a comment. 11 * bytecode.c (mark_byte_stack): Add a comment.
diff --git a/src/xdisp.c b/src/xdisp.c
index c50131134a2..671f7f8aa5f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7513,7 +7513,7 @@ redisplay_internal (preserve_echo_area)
7513 ++redisplaying_p; 7513 ++redisplaying_p;
7514 7514
7515 retry: 7515 retry:
7516 7516 pause = 0;
7517 reconsider_clip_changes (w, current_buffer); 7517 reconsider_clip_changes (w, current_buffer);
7518 7518
7519 /* If new fonts have been loaded that make a glyph matrix adjustment 7519 /* If new fonts have been loaded that make a glyph matrix adjustment
@@ -7867,9 +7867,9 @@ redisplay_internal (preserve_echo_area)
7867 ++clear_face_cache_count; 7867 ++clear_face_cache_count;
7868 7868
7869 7869
7870 /* Build desired matrices. If consider_all_windows_p is non-zero, 7870 /* Build desired matrices, and update the display. If
7871 do it for all windows on all frames. Otherwise do it for 7871 consider_all_windows_p is non-zero, do it for all windows on all
7872 selected_window, only. */ 7872 frames. Otherwise do it for selected_window, only. */
7873 7873
7874 if (consider_all_windows_p) 7874 if (consider_all_windows_p)
7875 { 7875 {
@@ -7889,6 +7889,7 @@ redisplay_internal (preserve_echo_area)
7889 FOR_EACH_FRAME (tail, frame) 7889 FOR_EACH_FRAME (tail, frame)
7890 { 7890 {
7891 struct frame *f = XFRAME (frame); 7891 struct frame *f = XFRAME (frame);
7892
7892 if (FRAME_WINDOW_P (f) || f == sf) 7893 if (FRAME_WINDOW_P (f) || f == sf)
7893 { 7894 {
7894 /* Mark all the scroll bars to be removed; we'll redeem 7895 /* Mark all the scroll bars to be removed; we'll redeem
@@ -7903,81 +7904,60 @@ redisplay_internal (preserve_echo_area)
7903 nuked should now go away. */ 7904 nuked should now go away. */
7904 if (judge_scroll_bars_hook) 7905 if (judge_scroll_bars_hook)
7905 (*judge_scroll_bars_hook) (f); 7906 (*judge_scroll_bars_hook) (f);
7907
7908 /* If fonts changed, display again. */
7909 if (fonts_changed_p)
7910 goto retry;
7911
7912 if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
7913 {
7914 /* See if we have to hscroll. */
7915 if (hscroll_windows (f->root_window))
7916 goto retry;
7917
7918 /* Prevent various kinds of signals during display
7919 update. stdio is not robust about handling
7920 signals, which can cause an apparent I/O
7921 error. */
7922 if (interrupt_input)
7923 unrequest_sigio ();
7924 stop_polling ();
7925
7926 /* Update the display. */
7927 set_window_update_flags (XWINDOW (f->root_window), 1);
7928 pause |= update_frame (f, 0, 0);
7929 if (pause)
7930 break;
7931
7932 mark_window_display_accurate (f->root_window, 1);
7933 if (frame_up_to_date_hook)
7934 frame_up_to_date_hook (f);
7935 }
7906 } 7936 }
7907 } 7937 }
7908 } 7938 }
7909 else if (FRAME_VISIBLE_P (sf) 7939 else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
7910 && !FRAME_OBSCURED_P (sf)) 7940 {
7911 redisplay_window (selected_window, 1); 7941 Lisp_Object mini_window;
7942 struct frame *mini_frame;
7912 7943
7944 redisplay_window (selected_window, 1);
7913 7945
7914 /* Compare desired and current matrices, perform output. */ 7946 /* Compare desired and current matrices, perform output. */
7915 7947 update:
7916update:
7917 7948
7918 /* If fonts changed, display again. */ 7949 /* If fonts changed, display again. */
7919 if (fonts_changed_p) 7950 if (fonts_changed_p)
7920 goto retry;
7921
7922 /* Prevent various kinds of signals during display update.
7923 stdio is not robust about handling signals,
7924 which can cause an apparent I/O error. */
7925 if (interrupt_input)
7926 unrequest_sigio ();
7927 stop_polling ();
7928
7929 if (consider_all_windows_p)
7930 {
7931 Lisp_Object tail;
7932 struct frame *f;
7933 int hscrolled_p;
7934
7935 pause = 0;
7936 hscrolled_p = 0;
7937
7938 /* See if we have to hscroll. */
7939 for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
7940 if (FRAMEP (XCAR (tail)))
7941 {
7942 f = XFRAME (XCAR (tail));
7943
7944 if ((FRAME_WINDOW_P (f)
7945 || f == sf)
7946 && FRAME_VISIBLE_P (f)
7947 && !FRAME_OBSCURED_P (f)
7948 && hscroll_windows (f->root_window))
7949 hscrolled_p = 1;
7950 }
7951
7952 if (hscrolled_p)
7953 goto retry; 7951 goto retry;
7954 7952
7955 for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) 7953 /* Prevent various kinds of signals during display update.
7956 { 7954 stdio is not robust about handling signals,
7957 if (!FRAMEP (XCAR (tail))) 7955 which can cause an apparent I/O error. */
7958 continue; 7956 if (interrupt_input)
7959 7957 unrequest_sigio ();
7960 f = XFRAME (XCAR (tail)); 7958 stop_polling ();
7961 7959
7962 if ((FRAME_WINDOW_P (f) || f == sf) 7960 if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
7963 && FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
7964 {
7965 /* Mark all windows as to be updated. */
7966 set_window_update_flags (XWINDOW (f->root_window), 1);
7967 pause |= update_frame (f, 0, 0);
7968 if (!pause)
7969 {
7970 mark_window_display_accurate (f->root_window, 1);
7971 if (frame_up_to_date_hook != 0)
7972 (*frame_up_to_date_hook) (f);
7973 }
7974 }
7975 }
7976 }
7977 else
7978 {
7979 if (FRAME_VISIBLE_P (sf)
7980 && !FRAME_OBSCURED_P (sf))
7981 { 7961 {
7982 if (hscroll_windows (selected_window)) 7962 if (hscroll_windows (selected_window))
7983 goto retry; 7963 goto retry;
@@ -7985,29 +7965,22 @@ update:
7985 XWINDOW (selected_window)->must_be_updated_p = 1; 7965 XWINDOW (selected_window)->must_be_updated_p = 1;
7986 pause = update_frame (sf, 0, 0); 7966 pause = update_frame (sf, 0, 0);
7987 } 7967 }
7988 else
7989 pause = 0;
7990 7968
7991 /* We may have called echo_area_display at the top of this 7969 /* We may have called echo_area_display at the top of this
7992 function. If the echo area is on another frame, that may 7970 function. If the echo area is on another frame, that may
7993 have put text on a frame other than the selected one, so the 7971 have put text on a frame other than the selected one, so the
7994 above call to update_frame would not have caught it. Catch 7972 above call to update_frame would not have caught it. Catch
7995 it here. */ 7973 it here. */
7996 { 7974 mini_window = FRAME_MINIBUF_WINDOW (sf);
7997 Lisp_Object mini_window; 7975 mini_frame = XFRAME (WINDOW_FRAME (XWINDOW (mini_window)));
7998 struct frame *mini_frame;
7999
8000 mini_window = FRAME_MINIBUF_WINDOW (sf);
8001 mini_frame = XFRAME (WINDOW_FRAME (XWINDOW (mini_window)));
8002 7976
8003 if (mini_frame != sf && FRAME_WINDOW_P (mini_frame)) 7977 if (mini_frame != sf && FRAME_WINDOW_P (mini_frame))
8004 { 7978 {
8005 XWINDOW (mini_window)->must_be_updated_p = 1; 7979 XWINDOW (mini_window)->must_be_updated_p = 1;
8006 pause |= update_frame (mini_frame, 0, 0); 7980 pause |= update_frame (mini_frame, 0, 0);
8007 if (!pause && hscroll_windows (mini_window)) 7981 if (!pause && hscroll_windows (mini_window))
8008 goto retry; 7982 goto retry;
8009 } 7983 }
8010 }
8011 } 7984 }
8012 7985
8013 /* If display was paused because of pending input, make sure we do a 7986 /* If display was paused because of pending input, make sure we do a
@@ -8843,7 +8816,8 @@ try_cursor_movement (window, startp, scroll_step)
8843 8816
8844 /* Start with the row the cursor was displayed during the last 8817 /* Start with the row the cursor was displayed during the last
8845 not paused redisplay. Give up if that row is not valid. */ 8818 not paused redisplay. Give up if that row is not valid. */
8846 if (w->last_cursor.vpos >= w->current_matrix->nrows) 8819 if (w->last_cursor.vpos < 0
8820 || w->last_cursor.vpos >= w->current_matrix->nrows)
8847 rc = -1; 8821 rc = -1;
8848 else 8822 else
8849 { 8823 {