diff options
| author | Martin Rudalics | 2014-08-10 10:26:28 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2014-08-10 10:26:28 +0200 |
| commit | c29f96fa6b074980faea5bd4bddb4c74993838b0 (patch) | |
| tree | 7ad142e338513b12278c4be995843e6c84b27887 /src/w32console.c | |
| parent | aa4008091c9adcc23924983f45eb442f55217056 (diff) | |
| download | emacs-c29f96fa6b074980faea5bd4bddb4c74993838b0.tar.gz emacs-c29f96fa6b074980faea5bd4bddb4c74993838b0.zip | |
Fix handling of menu bar line on TTY frames (Bug#18136) (Bug#18196).
* dispnew.c (handle_window_change_signal):
* keyboard.c (Fsuspend_emacs): Call change_frame_size with
frame's menu bar lines subtracted from height.
* frame.c (frame_inhibit_resize): Inhibit resizing of TTY
frames.
(adjust_frame_size): Count in menu bar when setting FrameRows.
(make_terminal_frame): When setting up the frame's lines and
text height don't count in the menu bar.
(Fmake_terminal_frame): Call adjust_frame_size with menu bar
lines subtracted from height.
(do_switch_frame): Set tty's FrameRows to number of total lines
of frame.
(Fframe_pixel_height, Fframe_pixel_width): If no window system
is used, return total number of lines and columns.
* menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
of FRAME_LINES.
* term.c (OUTPUT, tty_set_terminal_modes)
(tty_set_terminal_window, tty_set_scroll_region)
(tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
(tty_ins_del_lines, tty_menu_display, tty_menu_activate): Use
FRAME_TOTAL_LINES instead of FRAME_LINES.
(Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
Call change_frame_size with frame's menu bar lines subtracted
from height.
* w32console.c (w32con_clear_to_end, w32con_clear_frame)
(w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
FRAME_LINES.
Diffstat (limited to 'src/w32console.c')
| -rw-r--r-- | src/w32console.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/w32console.c b/src/w32console.c index 98f68145191..82a7c041900 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -118,7 +118,7 @@ static void | |||
| 118 | w32con_clear_to_end (struct frame *f) | 118 | w32con_clear_to_end (struct frame *f) |
| 119 | { | 119 | { |
| 120 | w32con_clear_end_of_line (f, FRAME_COLS (f) - 1); | 120 | w32con_clear_end_of_line (f, FRAME_COLS (f) - 1); |
| 121 | w32con_ins_del_lines (f, cursor_coords.Y, FRAME_LINES (f) - cursor_coords.Y - 1); | 121 | w32con_ins_del_lines (f, cursor_coords.Y, FRAME_TOTAL_LINES (f) - cursor_coords.Y - 1); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | /* Clear the frame. */ | 124 | /* Clear the frame. */ |
| @@ -133,7 +133,7 @@ w32con_clear_frame (struct frame *f) | |||
| 133 | GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info); | 133 | GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info); |
| 134 | 134 | ||
| 135 | /* Remember that the screen buffer might be wider than the window. */ | 135 | /* Remember that the screen buffer might be wider than the window. */ |
| 136 | n = FRAME_LINES (f) * info.dwSize.X; | 136 | n = FRAME_TOTAL_LINES (f) * info.dwSize.X; |
| 137 | dest.X = dest.Y = 0; | 137 | dest.X = dest.Y = 0; |
| 138 | 138 | ||
| 139 | FillConsoleOutputAttribute (cur_screen, char_attr_normal, n, dest, &r); | 139 | FillConsoleOutputAttribute (cur_screen, char_attr_normal, n, dest, &r); |
| @@ -175,18 +175,18 @@ w32con_ins_del_lines (struct frame *f, int vpos, int n) | |||
| 175 | if (n < 0) | 175 | if (n < 0) |
| 176 | { | 176 | { |
| 177 | scroll.Top = vpos - n; | 177 | scroll.Top = vpos - n; |
| 178 | scroll.Bottom = FRAME_LINES (f); | 178 | scroll.Bottom = FRAME_TOTAL_LINES (f); |
| 179 | dest.Y = vpos; | 179 | dest.Y = vpos; |
| 180 | } | 180 | } |
| 181 | else | 181 | else |
| 182 | { | 182 | { |
| 183 | scroll.Top = vpos; | 183 | scroll.Top = vpos; |
| 184 | scroll.Bottom = FRAME_LINES (f) - n; | 184 | scroll.Bottom = FRAME_TOTAL_LINES (f) - n; |
| 185 | dest.Y = vpos + n; | 185 | dest.Y = vpos + n; |
| 186 | } | 186 | } |
| 187 | clip.Top = clip.Left = scroll.Left = 0; | 187 | clip.Top = clip.Left = scroll.Left = 0; |
| 188 | clip.Right = scroll.Right = FRAME_COLS (f); | 188 | clip.Right = scroll.Right = FRAME_COLS (f); |
| 189 | clip.Bottom = FRAME_LINES (f); | 189 | clip.Bottom = FRAME_TOTAL_LINES (f); |
| 190 | 190 | ||
| 191 | dest.X = 0; | 191 | dest.X = 0; |
| 192 | 192 | ||