aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2013-04-10 18:38:20 +0300
committerEli Zaretskii2013-04-10 18:38:20 +0300
commitf009190abc3a010cc0ad01df81d02585d436ea3d (patch)
tree4d0c910e1f79b2104ca6c12e2b8fd1d3dfd673cd /src
parentda3cda2d10f5cbe398ea570e752a9921df7e18d8 (diff)
downloademacs-f009190abc3a010cc0ad01df81d02585d436ea3d.tar.gz
emacs-f009190abc3a010cc0ad01df81d02585d436ea3d.zip
Fix bug #13864 with flickering of TTY frames in an emacslient session.
src/frame.c (do_switch_frame): Mark the TTY frame we switch to as garbaged only if it is not already the top frame on its TTY. This prevents flickering due to constant redrawing of TTY frames when there are GUI frames open in the same session.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/frame.c16
2 files changed, 19 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6fdf601fa95..ff6b9508d62 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12013-04-10 Eli Zaretskii <eliz@gnu.org>
2
3 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
4 garbaged only if it is not already the top frame on its TTY. This
5 prevents flickering due to constant redrawing of TTY frames when
6 there are GUI frames open in the same session. (Bug#13864)
7
12013-04-10 Stefan Monnier <monnier@iro.umontreal.ca> 82013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
2 9
3 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead 10 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
diff --git a/src/frame.c b/src/frame.c
index 2fe398296ed..ccd50122f50 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -834,10 +834,18 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
834 834
835 if (FRAME_TERMCAP_P (XFRAME (frame)) || FRAME_MSDOS_P (XFRAME (frame))) 835 if (FRAME_TERMCAP_P (XFRAME (frame)) || FRAME_MSDOS_P (XFRAME (frame)))
836 { 836 {
837 if (FRAMEP (FRAME_TTY (XFRAME (frame))->top_frame)) 837 Lisp_Object top_frame = FRAME_TTY (XFRAME (frame))->top_frame;
838 /* Mark previously displayed frame as now obscured. */ 838
839 SET_FRAME_VISIBLE (XFRAME (FRAME_TTY (XFRAME (frame))->top_frame), 2); 839 /* Don't mark the frame garbaged and/or obscured if we are
840 SET_FRAME_VISIBLE (XFRAME (frame), 1); 840 switching to the frame that is already the top frame of that
841 TTY. */
842 if (!EQ (frame, top_frame))
843 {
844 if (FRAMEP (top_frame))
845 /* Mark previously displayed frame as now obscured. */
846 SET_FRAME_VISIBLE (XFRAME (top_frame), 2);
847 SET_FRAME_VISIBLE (XFRAME (frame), 1);
848 }
841 FRAME_TTY (XFRAME (frame))->top_frame = frame; 849 FRAME_TTY (XFRAME (frame))->top_frame = frame;
842 } 850 }
843 851