[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117327: Fix bug #17875 with changing TTY frame s
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-24 r117327: Fix bug #17875 with changing TTY frame size, then selecting new frame. |
Date: |
Mon, 30 Jun 2014 16:46:40 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117327
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17875
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-06-30 19:45:38 +0300
message:
Fix bug #17875 with changing TTY frame size, then selecting new frame.
src/frame.c (do_switch_frame): When switching to another TTY frame,
make sure FrameCols and FrameRows are in sync with the new frame's
data.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/frame.c frame.c-20091113204419-o5vbwnq5f7feedwu-243
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-06-28 07:24:01 +0000
+++ b/src/ChangeLog 2014-06-30 16:45:38 +0000
@@ -1,3 +1,9 @@
+2014-06-30 Eli Zaretskii <address@hidden>
+
+ * frame.c (do_switch_frame): When switching to another TTY frame,
+ make sure FrameCols and FrameRows are in sync with the new frame's
+ data. (Bug#17875)
+
2014-06-28 Andreas Schwab <address@hidden>
* coding.c (encode_coding_utf_8): Correctly count produced_chars
=== modified file 'src/frame.c'
--- a/src/frame.c 2014-06-01 18:49:52 +0000
+++ b/src/frame.c 2014-06-30 16:45:38 +0000
@@ -46,6 +46,7 @@
#ifdef HAVE_WINDOW_SYSTEM
#include "fontset.h"
#endif
+#include "cm.h"
#ifdef MSDOS
#include "msdos.h"
#include "dosfns.h"
@@ -851,7 +852,9 @@
if (FRAME_TERMCAP_P (XFRAME (frame)) || FRAME_MSDOS_P (XFRAME (frame)))
{
- Lisp_Object top_frame = FRAME_TTY (XFRAME (frame))->top_frame;
+ struct frame *f = XFRAME (frame);
+ struct tty_display_info *tty = FRAME_TTY (f);
+ Lisp_Object top_frame = tty->top_frame;
/* Don't mark the frame garbaged and/or obscured if we are
switching to the frame that is already the top frame of that
@@ -861,9 +864,16 @@
if (FRAMEP (top_frame))
/* Mark previously displayed frame as now obscured. */
SET_FRAME_VISIBLE (XFRAME (top_frame), 2);
- SET_FRAME_VISIBLE (XFRAME (frame), 1);
+ SET_FRAME_VISIBLE (f, 1);
+ /* If the new TTY frame changed dimensions, we need to
+ resync term.c's idea of the frame size with the new
+ frame's data. */
+ if (FRAME_COLS (f) != FrameCols (tty))
+ FrameCols (tty) = FRAME_COLS (f);
+ if (FRAME_LINES (f) != FrameRows (tty))
+ FrameRows (tty) = FRAME_LINES (f);
}
- FRAME_TTY (XFRAME (frame))->top_frame = frame;
+ tty->top_frame = frame;
}
selected_frame = frame;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117327: Fix bug #17875 with changing TTY frame size, then selecting new frame.,
Eli Zaretskii <=