aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/frame.h3
-rw-r--r--src/xdisp.c26
3 files changed, 30 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e7ac61b4fb4..2325b351217 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,18 @@
12013-09-06 Dmitry Antipov <dmantipov@yandex.ru> 12013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 Attempt to make redisplay more selective when changing cursor type.
4 * frame.h (struct frame): New bitfield cursor_type_changed.
5 * xdisp.c (cursor_type_changed): Remove.
6 (try_cursor_movement, redisplay_window, try_window_id)
7 (set_frame_cursor_types, try_window_reusing_current_matrix):
8 Adjust to use per-frame bitfield.
9 (redisplay_internal): Look for cursor type change on each visible
10 frame and consider all frames if cursor type has been changed on
11 the frame other than selected. If cursor type has been changed on
12 selected frame only, do not use fast update.
13
142013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
15
3 Attempt to make redisplay more selective when changing fonts. 16 Attempt to make redisplay more selective when changing fonts.
4 * frame.h (struct frame): New bitfield fonts_changed. 17 * frame.h (struct frame): New bitfield fonts_changed.
5 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration. 18 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
diff --git a/src/frame.h b/src/frame.h
index 3c7499ea814..3dfbac15709 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -214,6 +214,9 @@ struct frame
214 matrix adjustments. */ 214 matrix adjustments. */
215 unsigned fonts_changed : 1; 215 unsigned fonts_changed : 1;
216 216
217 /* Nonzero means that cursor type has been changed. */
218 unsigned cursor_type_changed : 1;
219
217 /* Margin at the top of the frame. Used to display the tool-bar. */ 220 /* Margin at the top of the frame. Used to display the tool-bar. */
218 int tool_bar_lines; 221 int tool_bar_lines;
219 222
diff --git a/src/xdisp.c b/src/xdisp.c
index 36f7f1e503e..a7f7fc88198 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -512,10 +512,6 @@ int update_mode_lines;
512 512
513int windows_or_buffers_changed; 513int windows_or_buffers_changed;
514 514
515/* Nonzero means a frame's cursor type has been changed. */
516
517static int cursor_type_changed;
518
519/* Nonzero after display_mode_line if %l was used and it displayed a 515/* Nonzero after display_mode_line if %l was used and it displayed a
520 line number. */ 516 line number. */
521 517
@@ -13010,6 +13006,10 @@ redisplay_internal (void)
13010 adjust_frame_glyphs (f); 13006 adjust_frame_glyphs (f);
13011 f->fonts_changed = 0; 13007 f->fonts_changed = 0;
13012 } 13008 }
13009 /* If cursor type has been changed on the frame
13010 other than selected, consider all frames. */
13011 if (f != sf && f->cursor_type_changed)
13012 update_mode_lines++;
13013 } 13013 }
13014 clear_desired_matrices (f); 13014 clear_desired_matrices (f);
13015 } 13015 }
@@ -13059,8 +13059,7 @@ redisplay_internal (void)
13059 } 13059 }
13060 13060
13061 consider_all_windows_p = (update_mode_lines 13061 consider_all_windows_p = (update_mode_lines
13062 || buffer_shared_and_changed () 13062 || buffer_shared_and_changed ());
13063 || cursor_type_changed);
13064 13063
13065 /* If specs for an arrow have changed, do thorough redisplay 13064 /* If specs for an arrow have changed, do thorough redisplay
13066 to ensure we remove any arrow that should no longer exist. */ 13065 to ensure we remove any arrow that should no longer exist. */
@@ -13151,6 +13150,7 @@ redisplay_internal (void)
13151 && !current_buffer->prevent_redisplay_optimizations_p 13150 && !current_buffer->prevent_redisplay_optimizations_p
13152 && FRAME_VISIBLE_P (XFRAME (w->frame)) 13151 && FRAME_VISIBLE_P (XFRAME (w->frame))
13153 && !FRAME_OBSCURED_P (XFRAME (w->frame)) 13152 && !FRAME_OBSCURED_P (XFRAME (w->frame))
13153 && !XFRAME (w->frame)->cursor_type_changed
13154 /* Make sure recorded data applies to current buffer, etc. */ 13154 /* Make sure recorded data applies to current buffer, etc. */
13155 && this_line_buffer == current_buffer 13155 && this_line_buffer == current_buffer
13156 && match_p 13156 && match_p
@@ -13419,6 +13419,7 @@ redisplay_internal (void)
13419 /* Update the display. */ 13419 /* Update the display. */
13420 set_window_update_flags (XWINDOW (f->root_window), 1); 13420 set_window_update_flags (XWINDOW (f->root_window), 1);
13421 pending |= update_frame (f, 0, 0); 13421 pending |= update_frame (f, 0, 0);
13422 f->cursor_type_changed = 0;
13422 f->updated_p = 1; 13423 f->updated_p = 1;
13423 } 13424 }
13424 } 13425 }
@@ -13480,6 +13481,7 @@ redisplay_internal (void)
13480 13481
13481 XWINDOW (selected_window)->must_be_updated_p = 1; 13482 XWINDOW (selected_window)->must_be_updated_p = 1;
13482 pending = update_frame (sf, 0, 0); 13483 pending = update_frame (sf, 0, 0);
13484 sf->cursor_type_changed = 0;
13483 } 13485 }
13484 13486
13485 /* We may have called echo_area_display at the top of this 13487 /* We may have called echo_area_display at the top of this
@@ -13494,6 +13496,7 @@ redisplay_internal (void)
13494 { 13496 {
13495 XWINDOW (mini_window)->must_be_updated_p = 1; 13497 XWINDOW (mini_window)->must_be_updated_p = 1;
13496 pending |= update_frame (mini_frame, 0, 0); 13498 pending |= update_frame (mini_frame, 0, 0);
13499 mini_frame->cursor_type_changed = 0;
13497 if (!pending && hscroll_windows (mini_window)) 13500 if (!pending && hscroll_windows (mini_window))
13498 goto retry; 13501 goto retry;
13499 } 13502 }
@@ -13534,7 +13537,6 @@ redisplay_internal (void)
13534 13537
13535 update_mode_lines = 0; 13538 update_mode_lines = 0;
13536 windows_or_buffers_changed = 0; 13539 windows_or_buffers_changed = 0;
13537 cursor_type_changed = 0;
13538 } 13540 }
13539 13541
13540 /* Start SIGIO interrupts coming again. Having them off during the 13542 /* Start SIGIO interrupts coming again. Having them off during the
@@ -14976,7 +14978,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
14976 cases. */ 14978 cases. */
14977 && !update_mode_lines 14979 && !update_mode_lines
14978 && !windows_or_buffers_changed 14980 && !windows_or_buffers_changed
14979 && !cursor_type_changed 14981 && !f->cursor_type_changed
14980 /* Can't use this case if highlighting a region. When a 14982 /* Can't use this case if highlighting a region. When a
14981 region exists, cursor movement has to do more than just 14983 region exists, cursor movement has to do more than just
14982 set the cursor. */ 14984 set the cursor. */
@@ -15972,7 +15974,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
15972 /* Redisplay the window. */ 15974 /* Redisplay the window. */
15973 if (!current_matrix_up_to_date_p 15975 if (!current_matrix_up_to_date_p
15974 || windows_or_buffers_changed 15976 || windows_or_buffers_changed
15975 || cursor_type_changed 15977 || f->cursor_type_changed
15976 /* Don't use try_window_reusing_current_matrix in this case 15978 /* Don't use try_window_reusing_current_matrix in this case
15977 because it can have changed the buffer. */ 15979 because it can have changed the buffer. */
15978 || !NILP (Vwindow_scroll_functions) 15980 || !NILP (Vwindow_scroll_functions)
@@ -16351,7 +16353,7 @@ try_window_reusing_current_matrix (struct window *w)
16351 /* Don't try to reuse the display if windows have been split 16353 /* Don't try to reuse the display if windows have been split
16352 or such. */ 16354 or such. */
16353 || windows_or_buffers_changed 16355 || windows_or_buffers_changed
16354 || cursor_type_changed) 16356 || f->cursor_type_changed)
16355 return 0; 16357 return 0;
16356 16358
16357 /* Can't do this if region may have changed. */ 16359 /* Can't do this if region may have changed. */
@@ -17122,7 +17124,7 @@ try_window_id (struct window *w)
17122 GIVE_UP (1); 17124 GIVE_UP (1);
17123 17125
17124 /* This flag is used to prevent redisplay optimizations. */ 17126 /* This flag is used to prevent redisplay optimizations. */
17125 if (windows_or_buffers_changed || cursor_type_changed) 17127 if (windows_or_buffers_changed || f->cursor_type_changed)
17126 GIVE_UP (2); 17128 GIVE_UP (2);
17127 17129
17128 /* Verify that narrowing has not changed. 17130 /* Verify that narrowing has not changed.
@@ -25948,7 +25950,7 @@ set_frame_cursor_types (struct frame *f, Lisp_Object arg)
25948 FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR; 25950 FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR;
25949 25951
25950 /* Make sure the cursor gets redrawn. */ 25952 /* Make sure the cursor gets redrawn. */
25951 cursor_type_changed = 1; 25953 f->cursor_type_changed = 1;
25952} 25954}
25953 25955
25954 25956