summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/frame.c b/src/frame.c
index 9c8926c42c..1c5c12c7e2 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -509,10 +509,13 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
block_input ();
#ifdef MSDOS
- /* We only can set screen dimensions to certain values supported
- by our video hardware. Try to find the smallest size greater
- or equal to the requested dimensions. */
- dos_set_window_size (&new_lines, &new_cols);
+ /* We only can set screen dimensions to certain values supported by
+ our video hardware. Try to find the smallest size greater or
+ equal to the requested dimensions, while accounting for the fact
+ that the menu-bar lines are not counted in the frame height. */
+ int dos_new_lines = new_lines + FRAME_TOP_MARGIN (f);
+ dos_set_window_size (&dos_new_lines, &new_cols);
+ new_lines = dos_new_lines - FRAME_TOP_MARGIN (f);
#endif
if (new_windows_width != old_windows_width)