emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114155: Attempt to make redisplay more selective wh


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r114155: Attempt to make redisplay more selective when changing cursor type.
Date: Fri, 06 Sep 2013 08:49:42 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114155
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Fri 2013-09-06 12:49:14 +0400
message:
  Attempt to make redisplay more selective when changing cursor type.
  * frame.h (struct frame): New bitfield cursor_type_changed.
  * xdisp.c (cursor_type_changed): Remove.
  (try_cursor_movement, redisplay_window, try_window_id)
  (set_frame_cursor_types, try_window_reusing_current_matrix):
  Adjust to use per-frame bitfield.
  (redisplay_internal): Look for cursor type change on each visible
  frame and consider all frames if cursor type has been changed on
  the frame other than selected.  If cursor type has been changed on
  selected frame only, do not use fast update.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/frame.h                    frame.h-20091113204419-o5vbwnq5f7feedwu-229
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-09-06 07:08:19 +0000
+++ b/src/ChangeLog     2013-09-06 08:49:14 +0000
@@ -1,5 +1,18 @@
 2013-09-06  Dmitry Antipov  <address@hidden>
 
+       Attempt to make redisplay more selective when changing cursor type.
+       * frame.h (struct frame): New bitfield cursor_type_changed.
+       * xdisp.c (cursor_type_changed): Remove.
+       (try_cursor_movement, redisplay_window, try_window_id)
+       (set_frame_cursor_types, try_window_reusing_current_matrix):
+       Adjust to use per-frame bitfield.
+       (redisplay_internal): Look for cursor type change on each visible
+       frame and consider all frames if cursor type has been changed on
+       the frame other than selected.  If cursor type has been changed on
+       selected frame only, do not use fast update.
+
+2013-09-06  Dmitry Antipov  <address@hidden>
+
        Attempt to make redisplay more selective when changing fonts.
        * frame.h (struct frame): New bitfield fonts_changed.
        * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.

=== modified file 'src/frame.h'
--- a/src/frame.h       2013-09-06 07:00:29 +0000
+++ b/src/frame.h       2013-09-06 08:49:14 +0000
@@ -214,6 +214,9 @@
      matrix adjustments.  */
   unsigned fonts_changed : 1;
 
+  /* Nonzero means that cursor type has been changed.  */
+  unsigned cursor_type_changed : 1;
+
   /* Margin at the top of the frame.  Used to display the tool-bar.  */
   int tool_bar_lines;
 

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-09-06 07:00:29 +0000
+++ b/src/xdisp.c       2013-09-06 08:49:14 +0000
@@ -512,10 +512,6 @@
 
 int windows_or_buffers_changed;
 
-/* Nonzero means a frame's cursor type has been changed.  */
-
-static int cursor_type_changed;
-
 /* Nonzero after display_mode_line if %l was used and it displayed a
    line number.  */
 
@@ -13010,6 +13006,10 @@
              adjust_frame_glyphs (f);
              f->fonts_changed = 0;
            }
+         /* If cursor type has been changed on the frame
+            other than selected, consider all frames.  */
+         if (f != sf && f->cursor_type_changed)
+           update_mode_lines++;
        }
       clear_desired_matrices (f);
     }
@@ -13059,8 +13059,7 @@
     }
 
   consider_all_windows_p = (update_mode_lines
-                           || buffer_shared_and_changed ()
-                           || cursor_type_changed);
+                           || buffer_shared_and_changed ());
 
   /* If specs for an arrow have changed, do thorough redisplay
      to ensure we remove any arrow that should no longer exist.  */
@@ -13151,6 +13150,7 @@
       && !current_buffer->prevent_redisplay_optimizations_p
       && FRAME_VISIBLE_P (XFRAME (w->frame))
       && !FRAME_OBSCURED_P (XFRAME (w->frame))
+      && !XFRAME (w->frame)->cursor_type_changed
       /* Make sure recorded data applies to current buffer, etc.  */
       && this_line_buffer == current_buffer
       && match_p
@@ -13419,6 +13419,7 @@
                  /* Update the display.  */
                  set_window_update_flags (XWINDOW (f->root_window), 1);
                  pending |= update_frame (f, 0, 0);
+                 f->cursor_type_changed = 0;
                  f->updated_p = 1;
                }
            }
@@ -13480,6 +13481,7 @@
 
          XWINDOW (selected_window)->must_be_updated_p = 1;
          pending = update_frame (sf, 0, 0);
+         sf->cursor_type_changed = 0;
        }
 
       /* We may have called echo_area_display at the top of this
@@ -13494,6 +13496,7 @@
        {
          XWINDOW (mini_window)->must_be_updated_p = 1;
          pending |= update_frame (mini_frame, 0, 0);
+         mini_frame->cursor_type_changed = 0;
          if (!pending && hscroll_windows (mini_window))
            goto retry;
        }
@@ -13534,7 +13537,6 @@
 
       update_mode_lines = 0;
       windows_or_buffers_changed = 0;
-      cursor_type_changed = 0;
     }
 
   /* Start SIGIO interrupts coming again.  Having them off during the
@@ -14976,7 +14978,7 @@
         cases.  */
       && !update_mode_lines
       && !windows_or_buffers_changed
-      && !cursor_type_changed
+      && !f->cursor_type_changed
       /* Can't use this case if highlighting a region.  When a
          region exists, cursor movement has to do more than just
          set the cursor.  */
@@ -15972,7 +15974,7 @@
   /* Redisplay the window.  */
   if (!current_matrix_up_to_date_p
       || windows_or_buffers_changed
-      || cursor_type_changed
+      || f->cursor_type_changed
       /* Don't use try_window_reusing_current_matrix in this case
         because it can have changed the buffer.  */
       || !NILP (Vwindow_scroll_functions)
@@ -16351,7 +16353,7 @@
       /* Don't try to reuse the display if windows have been split
         or such.  */
       || windows_or_buffers_changed
-      || cursor_type_changed)
+      || f->cursor_type_changed)
     return 0;
 
   /* Can't do this if region may have changed.  */
@@ -17122,7 +17124,7 @@
     GIVE_UP (1);
 
   /* This flag is used to prevent redisplay optimizations.  */
-  if (windows_or_buffers_changed || cursor_type_changed)
+  if (windows_or_buffers_changed || f->cursor_type_changed)
     GIVE_UP (2);
 
   /* Verify that narrowing has not changed.
@@ -25948,7 +25950,7 @@
     FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR;
 
   /* Make sure the cursor gets redrawn.  */
-  cursor_type_changed = 1;
+  f->cursor_type_changed = 1;
 }
 
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]