Function: set-frame-size

set-frame-size is a function defined in frame.c.

Signature

(set-frame-size FRAME WIDTH HEIGHT &optional PIXELWISE)

Documentation

Set text size of FRAME to WIDTH by HEIGHT, measured in characters.

Optional argument PIXELWISE non-nil means to measure in pixels. Note: When frame-resize-pixelwise is nil, some window managers may refuse to honor a WIDTH that is not an integer multiple of the default frame font width or a HEIGHT that is not an integer multiple of the default frame font height.

If FRAME is nil, it defaults to the selected frame.

View in manual

Source Code

// Defined in /usr/src/emacs/src/frame.c
{
  struct frame *f = decode_live_frame (frame);
  int text_width
    = check_frame_pixels (width, pixelwise, FRAME_COLUMN_WIDTH (f));
  int text_height
    = check_frame_pixels (height, pixelwise, FRAME_LINE_HEIGHT (f));

  /* PRETEND is always false here.  */
  adjust_frame_size (f, text_width, text_height, 1, false, Qsize);

  return Qnil;
}