emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100470: Fix bug #8020 with quick


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100470: Fix bug #8020 with quick resizing of the selected frame.
Date: Sun, 13 Feb 2011 20:55:07 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100470
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-23
timestamp: Sun 2011-02-13 20:55:07 +0200
message:
  Fix bug #8020 with quick resizing of the selected frame.
  
   xdisp.c (redisplay_internal): Resynchronize `w' if the selected
   window is changed inside calls to do_pending_window_change.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-02-12 09:47:28 +0000
+++ b/src/ChangeLog     2011-02-13 18:55:07 +0000
@@ -1,3 +1,9 @@
+2011-02-13  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (redisplay_internal): Resynchronize `w' if the selected
+       window is changed inside calls to do_pending_window_change.
+       (Bug#8020)
+
 2011-02-12  Eli Zaretskii  <address@hidden>
 
        * terminal.c (create_terminal): Use default-keyboard-coding-system

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-01-24 22:05:52 +0000
+++ b/src/xdisp.c       2011-02-13 18:55:07 +0000
@@ -11261,6 +11261,7 @@
      int preserve_echo_area;
 {
   struct window *w = XWINDOW (selected_window);
+  struct window *sw;
   struct frame *f;
   int pause;
   int must_finish = 0;
@@ -11331,6 +11332,9 @@
   }
 
  retry:
+  /* Remember the currently selected window.  */
+  sw = w;
+
   if (!EQ (old_frame, selected_frame)
       && FRAME_LIVE_P (XFRAME (old_frame)))
     /* When running redisplay, we play a bit fast-and-loose and allow e.g.
@@ -11396,6 +11400,14 @@
   /* Notice any pending interrupt request to change frame size.  */
   do_pending_window_change (1);
 
+  /* do_pending_window_change could change the selected_window due to
+     frame resizing which makes the selected window too small.  */
+  if (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw)
+    {
+      sw = w;
+      reconsider_clip_changes (w, current_buffer);
+    }
+
   /* Clear frames marked as garbaged.  */
   if (frame_garbaged)
     clear_garbaged_frames ();
@@ -11665,6 +11677,10 @@
          if (!must_finish)
            {
              do_pending_window_change (1);
+             /* If selected_window changed, redisplay again.  */
+             if (WINDOWP (selected_window)
+                 && (w = XWINDOW (selected_window)) != sw)
+               goto retry;
 
              /* We used to always goto end_of_redisplay here, but this
                 isn't enough if we have a blinking cursor.  */
@@ -11959,8 +11975,9 @@
   do_pending_window_change (1);
 
   /* If we just did a pending size change, or have additional
-     visible frames, redisplay again.  */
-  if (windows_or_buffers_changed && !pause)
+     visible frames, or selected_window changed, redisplay again.  */
+  if ((windows_or_buffers_changed && !pause)
+      || (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw))
     goto retry;
 
   /* Clear the face cache eventually.  */


reply via email to

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