aboutsummaryrefslogtreecommitdiffstats
path: root/src/xfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 572cf38e0c7..db42e005d75 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3396,6 +3396,45 @@ This function is an internal primitive--use `make-frame' instead. */)
3396 /* Compute the size of the X window. */ 3396 /* Compute the size of the X window. */
3397 window_prompting = x_figure_window_size (f, parms, 1); 3397 window_prompting = x_figure_window_size (f, parms, 1);
3398 3398
3399 /* Don't make height higher than display height unless the user asked
3400 for it. */
3401 height = FRAME_LINES (f);
3402 tem = x_get_arg (dpyinfo, parms, Qheight, 0, 0, RES_TYPE_NUMBER);
3403 if (EQ (tem, Qunbound))
3404 {
3405 int ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, FRAME_LINES (f));
3406 int dph = DisplayHeight (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f));
3407 if (ph > dph)
3408 {
3409 height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, dph) -
3410 FRAME_TOOL_BAR_LINES (f) - FRAME_MENU_BAR_LINES (f);
3411 if (FRAME_EXTERNAL_TOOL_BAR (f))
3412 height -= 2; /* We can't know how big it will be. */
3413 if (FRAME_EXTERNAL_MENU_BAR (f))
3414 height -= 2; /* We can't know how big it will be. */
3415 }
3416 }
3417
3418 /* Don't make width wider than display width unless the user asked
3419 for it. */
3420 width = FRAME_COLS (f);
3421 tem = x_get_arg (dpyinfo, parms, Qwidth, 0, 0, RES_TYPE_NUMBER);
3422 if (EQ (tem, Qunbound))
3423 {
3424 int pw = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, FRAME_COLS (f));
3425 int dpw = DisplayWidth (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f));
3426 if (pw > dpw)
3427 width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, dpw);
3428 }
3429
3430 if (height != FRAME_LINES (f) || width != FRAME_COLS (f))
3431 {
3432 check_frame_size (f, &height, &width);
3433 FRAME_LINES (f) = height;
3434 SET_FRAME_COLS (f, width);
3435 }
3436
3437
3399 tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); 3438 tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN);
3400 f->no_split = minibuffer_only || EQ (tem, Qt); 3439 f->no_split = minibuffer_only || EQ (tem, Qt);
3401 3440