aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
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/frame.c
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/frame.c')
-rw-r--r--src/frame.c16
1 files changed, 12 insertions, 4 deletions
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