From 0ee18172b3dabfbddc81993cbba766cc925281be Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 7 Aug 2013 16:49:47 +0300 Subject: [PATCH] Fix bug #14616 with unnecessary redrawing of TTY frames. 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 | 6 ++++++ src/xdisp.c | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f759584fb79..a0363732164 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-08-07 Eli Zaretskii + + * 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 * w32term.c (w32fullscreen_hook): Really maximize frame when diff --git a/src/xdisp.c b/src/xdisp.c index 5e6311ed98d..fc19b5ce6d7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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); } } -- 2.39.2