diff options
Diffstat (limited to 'src/frame.c')
| -rw-r--r-- | src/frame.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c index c67a233f099..0ccc0f6fcfd 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -46,6 +46,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 46 | #ifdef HAVE_WINDOW_SYSTEM | 46 | #ifdef HAVE_WINDOW_SYSTEM |
| 47 | #include "fontset.h" | 47 | #include "fontset.h" |
| 48 | #endif | 48 | #endif |
| 49 | #include "cm.h" | ||
| 49 | #ifdef MSDOS | 50 | #ifdef MSDOS |
| 50 | #include "msdos.h" | 51 | #include "msdos.h" |
| 51 | #include "dosfns.h" | 52 | #include "dosfns.h" |
| @@ -854,7 +855,9 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor | |||
| 854 | 855 | ||
| 855 | if (FRAME_TERMCAP_P (XFRAME (frame)) || FRAME_MSDOS_P (XFRAME (frame))) | 856 | if (FRAME_TERMCAP_P (XFRAME (frame)) || FRAME_MSDOS_P (XFRAME (frame))) |
| 856 | { | 857 | { |
| 857 | Lisp_Object top_frame = FRAME_TTY (XFRAME (frame))->top_frame; | 858 | struct frame *f = XFRAME (frame); |
| 859 | struct tty_display_info *tty = FRAME_TTY (f); | ||
| 860 | Lisp_Object top_frame = tty->top_frame; | ||
| 858 | 861 | ||
| 859 | /* Don't mark the frame garbaged and/or obscured if we are | 862 | /* Don't mark the frame garbaged and/or obscured if we are |
| 860 | switching to the frame that is already the top frame of that | 863 | switching to the frame that is already the top frame of that |
| @@ -864,9 +867,16 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor | |||
| 864 | if (FRAMEP (top_frame)) | 867 | if (FRAMEP (top_frame)) |
| 865 | /* Mark previously displayed frame as now obscured. */ | 868 | /* Mark previously displayed frame as now obscured. */ |
| 866 | SET_FRAME_VISIBLE (XFRAME (top_frame), 2); | 869 | SET_FRAME_VISIBLE (XFRAME (top_frame), 2); |
| 867 | SET_FRAME_VISIBLE (XFRAME (frame), 1); | 870 | SET_FRAME_VISIBLE (f, 1); |
| 871 | /* If the new TTY frame changed dimensions, we need to | ||
| 872 | resync term.c's idea of the frame size with the new | ||
| 873 | frame's data. */ | ||
| 874 | if (FRAME_COLS (f) != FrameCols (tty)) | ||
| 875 | FrameCols (tty) = FRAME_COLS (f); | ||
| 876 | if (FRAME_LINES (f) != FrameRows (tty)) | ||
| 877 | FrameRows (tty) = FRAME_LINES (f); | ||
| 868 | } | 878 | } |
| 869 | FRAME_TTY (XFRAME (frame))->top_frame = frame; | 879 | tty->top_frame = frame; |
| 870 | } | 880 | } |
| 871 | 881 | ||
| 872 | selected_frame = frame; | 882 | selected_frame = frame; |