]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #14616 with unnecessary redrawing of TTY frames.
authorEli Zaretskii <eliz@gnu.org>
Wed, 7 Aug 2013 13:49:47 +0000 (16:49 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 7 Aug 2013 13:49:47 +0000 (16:49 +0300)
 src/xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
 for TTY frames that are not the top frame on their console.

src/ChangeLog
src/xdisp.c

index f759584fb796d7495524b6452087e3a87bcf2fe1..a0363732164c449fb51326578f360ceec51589ee 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
+       for TTY frames that are not the top frame on their console.
+       (Bug#14616)
+
 2013-08-07  Martin Rudalics  <rudalics@gmx.at>
 
        * w32term.c (w32fullscreen_hook): Really maximize frame when
index 5e6311ed98dac5da0fd478f4af94db0e22753f61..fc19b5ce6d7ddf59df9dbf5e02d2acbcefe8d1ca 100644 (file)
@@ -11169,7 +11169,18 @@ prepare_menu_bars (void)
        {
          f = XFRAME (frame);
          if (!EQ (frame, tooltip_frame)
-             && (FRAME_VISIBLE_P (f) || FRAME_ICONIFIED_P (f)))
+             && (FRAME_ICONIFIED_P (f)
+                 || FRAME_VISIBLE_P (f) == 1
+                 /* Exclude TTY frames that are obscured because they
+                    are not the top frame on their console.  This is
+                    because x_consider_frame_title actually swit6ches
+                    to the frame, which for TTY frames means it is
+                    marked as garbaged, and will be completely
+                    redrawn on the next redisplay cycle.  This causes
+                    TTY frames to be completely redrawn, when there
+                    are more than one of them, even though nothing
+                    should be changed on display.  */
+                 || (FRAME_VISIBLE_P (f) == 2 && FRAME_WINDOW_P (f))))
            x_consider_frame_title (frame);
        }
     }