comparison src/window.c @ 4347:d6b289b1a6dc

* window.c (check_frame_size): Include the menu bar height in the minimum frame height.
author Jim Blandy <jimb@redhat.com>
date Fri, 30 Jul 1993 01:48:19 +0000
parents 990f6ee7f527
children 9fc21d8d9441
comparison
equal deleted inserted replaced
4346:3011390123ed 4347:d6b289b1a6dc
1407 void 1407 void
1408 check_frame_size (frame, rows, cols) 1408 check_frame_size (frame, rows, cols)
1409 FRAME_PTR frame; 1409 FRAME_PTR frame;
1410 int *rows, *cols; 1410 int *rows, *cols;
1411 { 1411 {
1412 /* For height, we have to see whether the frame has a minibuffer, and 1412 /* For height, we have to see:
1413 whether it wants a mode line. */ 1413 whether the frame has a minibuffer,
1414 whether it wants a mode line, and
1415 whether it has a menu bar. */
1414 int min_height = 1416 int min_height =
1415 (FRAME_MINIBUF_ONLY_P (frame) ? MIN_SAFE_WINDOW_HEIGHT - 1 1417 (FRAME_MINIBUF_ONLY_P (frame) ? MIN_SAFE_WINDOW_HEIGHT - 1
1416 : (! FRAME_HAS_MINIBUF_P (frame)) ? MIN_SAFE_WINDOW_HEIGHT 1418 : (! FRAME_HAS_MINIBUF_P (frame)) ? MIN_SAFE_WINDOW_HEIGHT
1417 : 2 * MIN_SAFE_WINDOW_HEIGHT - 1); 1419 : 2 * MIN_SAFE_WINDOW_HEIGHT - 1);
1420 if (FRAME_MENU_BAR_LINES (frame) > 0)
1421 min_height += FRAME_MENU_BAR_LINES (frame);
1418 1422
1419 if (*rows < min_height) 1423 if (*rows < min_height)
1420 *rows = min_height; 1424 *rows = min_height;
1421 if (*cols < MIN_SAFE_WINDOW_WIDTH) 1425 if (*cols < MIN_SAFE_WINDOW_WIDTH)
1422 *cols = MIN_SAFE_WINDOW_WIDTH; 1426 *cols = MIN_SAFE_WINDOW_WIDTH;