aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-03-16 16:03:44 +0000
committerKaroly Lorentey2005-03-16 16:03:44 +0000
commit38d2de214077b4e600d9f9d20d7ec81e1f1c8908 (patch)
treefe3d42c04fd616f8e567e27331134d9b55c63dd9 /src
parenta810eaf92838985d9648acb470dc3c8d26847c15 (diff)
parent418b505281d03c422860a5116c328c91455724d2 (diff)
downloademacs-38d2de214077b4e600d9f9d20d7ec81e1f1c8908.tar.gz
emacs-38d2de214077b4e600d9f9d20d7ec81e1f1c8908.zip
Merged from miles@gnu.org--gnu-2005 (patch 160-161)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-160 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-161 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-308
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog16
-rw-r--r--src/blockinput.h8
-rw-r--r--src/xdisp.c53
3 files changed, 56 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fc2ded6ce94..854a8673458 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12005-03-07 Kim F. Storm <storm@cua.dk>
2
3 * xdisp.c (CLEAR_IMAGE_CACHE_COUNT): New const.
4 (clear_image_cache_count): New var.
5 (redisplay_internal): Don't clear face and image caches in the
6 middle of redisplay; do it afterwards.
7
8 * blockinput.h (TOTALLY_UNBLOCK_INPUT): Avoid dangling else.
9
10 * xdisp.c (notice_overwritten_cursor): Check that phys_cursor.vpos
11 is valid. If not, clear phys_cursor_on_p and return.
12
132005-03-07 Andreas Schwab <schwab@suse.de>
14
15 * blockinput.h (UNBLOCK_INPUT_TO): Always call UNBLOCK_INPUT.
16
12005-03-06 Richard M. Stallman <rms@gnu.org> 172005-03-06 Richard M. Stallman <rms@gnu.org>
2 18
3 * keyboard.c (Ftop_level): Let Fthrow deal with UNBLOCK_INPUT. 19 * keyboard.c (Ftop_level): Let Fthrow deal with UNBLOCK_INPUT.
diff --git a/src/blockinput.h b/src/blockinput.h
index a3b50d2a0f2..6aa865ea9be 100644
--- a/src/blockinput.h
+++ b/src/blockinput.h
@@ -98,12 +98,12 @@ extern int pending_atimers;
98 and also reinvoke any pending signal. */ 98 and also reinvoke any pending signal. */
99 99
100#define TOTALLY_UNBLOCK_INPUT \ 100#define TOTALLY_UNBLOCK_INPUT \
101 if (interrupt_input_blocked != 0) \ 101 do if (interrupt_input_blocked != 0) \
102 { \ 102 { \
103 interrupt_input_blocked = 1; \ 103 interrupt_input_blocked = 1; \
104 UNBLOCK_INPUT; \ 104 UNBLOCK_INPUT; \
105 } \ 105 } \
106 else 106 while (0)
107 107
108/* Undo any number of BLOCK_INPUT calls down to level LEVEL, 108/* Undo any number of BLOCK_INPUT calls down to level LEVEL,
109 and also (if the level is now 0) reinvoke any pending signal. */ 109 and also (if the level is now 0) reinvoke any pending signal. */
@@ -111,10 +111,8 @@ extern int pending_atimers;
111#define UNBLOCK_INPUT_TO(LEVEL) \ 111#define UNBLOCK_INPUT_TO(LEVEL) \
112 do \ 112 do \
113 { \ 113 { \
114 int oldlevel = interrupt_input_blocked; \
115 interrupt_input_blocked = (LEVEL) + 1; \ 114 interrupt_input_blocked = (LEVEL) + 1; \
116 if (interrupt_input_blocked != oldlevel + 1) \ 115 UNBLOCK_INPUT; \
117 UNBLOCK_INPUT; \
118 } \ 116 } \
119 while (0) 117 while (0)
120 118
diff --git a/src/xdisp.c b/src/xdisp.c
index 2b69e885954..7f7e60e81b8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -781,6 +781,13 @@ enum move_it_result
781#define CLEAR_FACE_CACHE_COUNT 500 781#define CLEAR_FACE_CACHE_COUNT 500
782static int clear_face_cache_count; 782static int clear_face_cache_count;
783 783
784/* Similarly for the image cache. */
785
786#ifdef HAVE_WINDOW_SYSTEM
787#define CLEAR_IMAGE_CACHE_COUNT 101
788static int clear_image_cache_count;
789#endif
790
784/* Non-zero while redisplay_internal is in progress. */ 791/* Non-zero while redisplay_internal is in progress. */
785 792
786int redisplaying_p; 793int redisplaying_p;
@@ -10360,7 +10367,9 @@ redisplay_internal (preserve_echo_area)
10360 CHARPOS (this_line_start_pos) = 0; 10367 CHARPOS (this_line_start_pos) = 0;
10361 consider_all_windows_p |= buffer_shared > 1; 10368 consider_all_windows_p |= buffer_shared > 1;
10362 ++clear_face_cache_count; 10369 ++clear_face_cache_count;
10363 10370#ifdef HAVE_WINDOW_SYSTEM
10371 ++clear_image_cache_count;
10372#endif
10364 10373
10365 /* Build desired matrices, and update the display. If 10374 /* Build desired matrices, and update the display. If
10366 consider_all_windows_p is non-zero, do it for all windows on all 10375 consider_all_windows_p is non-zero, do it for all windows on all
@@ -10373,13 +10382,6 @@ redisplay_internal (preserve_echo_area)
10373 struct frame **updated 10382 struct frame **updated
10374 = (struct frame **) alloca (size * sizeof *updated); 10383 = (struct frame **) alloca (size * sizeof *updated);
10375 10384
10376 /* Clear the face cache eventually. */
10377 if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
10378 {
10379 clear_face_cache (0);
10380 clear_face_cache_count = 0;
10381 }
10382
10383 /* Recompute # windows showing selected buffer. This will be 10385 /* Recompute # windows showing selected buffer. This will be
10384 incremented each time such a window is displayed. */ 10386 incremented each time such a window is displayed. */
10385 buffer_shared = 0; 10387 buffer_shared = 0;
@@ -10395,12 +10397,6 @@ redisplay_internal (preserve_echo_area)
10395 variables. */ 10397 variables. */
10396 select_frame_for_redisplay (frame); 10398 select_frame_for_redisplay (frame);
10397 10399
10398#ifdef HAVE_WINDOW_SYSTEM
10399 if (clear_face_cache_count % 50 == 0
10400 && FRAME_WINDOW_P (f))
10401 clear_image_cache (f, 0);
10402#endif /* HAVE_WINDOW_SYSTEM */
10403
10404 /* Mark all the scroll bars to be removed; we'll redeem 10400 /* Mark all the scroll bars to be removed; we'll redeem
10405 the ones we want when we redisplay their windows. */ 10401 the ones we want when we redisplay their windows. */
10406 if (FRAME_DISPLAY (f)->condemn_scroll_bars_hook) 10402 if (FRAME_DISPLAY (f)->condemn_scroll_bars_hook)
@@ -10604,6 +10600,29 @@ redisplay_internal (preserve_echo_area)
10604 if (windows_or_buffers_changed && !pause) 10600 if (windows_or_buffers_changed && !pause)
10605 goto retry; 10601 goto retry;
10606 10602
10603 /* Clear the face cache eventually. */
10604 if (consider_all_windows_p)
10605 {
10606 if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
10607 {
10608 clear_face_cache (0);
10609 clear_face_cache_count = 0;
10610 }
10611#ifdef HAVE_WINDOW_SYSTEM
10612 if (clear_image_cache_count > CLEAR_IMAGE_CACHE_COUNT)
10613 {
10614 Lisp_Object tail, frame;
10615 FOR_EACH_FRAME (tail, frame)
10616 {
10617 struct frame *f = XFRAME (frame);
10618 if (FRAME_WINDOW_P (f))
10619 clear_image_cache (f, 0);
10620 }
10621 clear_image_cache_count = 0;
10622 }
10623#endif /* HAVE_WINDOW_SYSTEM */
10624 }
10625
10607 end_of_redisplay: 10626 end_of_redisplay:
10608 unbind_to (count, Qnil); 10627 unbind_to (count, Qnil);
10609 RESUME_POLLING; 10628 RESUME_POLLING;
@@ -20202,8 +20221,10 @@ notice_overwritten_cursor (w, area, x0, x1, y0, y1)
20202 if (area != TEXT_AREA) 20221 if (area != TEXT_AREA)
20203 return; 20222 return;
20204 20223
20205 row = w->current_matrix->rows + w->phys_cursor.vpos; 20224 if (w->phys_cursor.vpos < 0
20206 if (!row->displays_text_p) 20225 || w->phys_cursor.vpos >= w->current_matrix->nrows
20226 || (row = w->current_matrix->rows + w->phys_cursor.vpos,
20227 !(row->enabled_p && row->displays_text_p)))
20207 return; 20228 return;
20208 20229
20209 if (row->cursor_in_fringe_p) 20230 if (row->cursor_in_fringe_p)