Variable: frame-inhibit-implied-resize
frame-inhibit-implied-resize is a customizable variable defined in
frame.c.
Value
t
Documentation
Whether frames should be resized implicitly.
If this option is nil, setting font, menu bar, tool bar, tab bar, internal borders, fringes or scroll bars of a specific frame may resize the frame in order to preserve the number of columns or lines it displays.
If this option is t, no such resizing happens once Emacs has agreed with the window manager on the final initial size of a frame. That size will have taken into account the size of the text area requested by the user and the size of all decorations initially present on the frame.
If this is the symbol force, no implicit resizing happens even before
a frame has obtained its final initial size. As a consequence, the
initial frame size may not necessarily be the one requested by the user.
This value can be useful with tiling window managers where the initial
size of a frame is determined by external means.
The value of this option can be also a list of frame parameters. In
this case, resizing is inhibited once a frame has obtained its final
initial size when changing a parameter that appears in that list. The
parameters currently handled by this option include font,
font-backend, internal-border-width, menu-bar-lines,
tool-bar-lines and tab-bar-lines.
Changing any of the parameters scroll-bar-width, scroll-bar-height,
vertical-scroll-bars, horizontal-scroll-bars, left-fringe and
right-fringe is handled as if the frame contained just one live
window. This means, for example, that removing vertical scroll bars on
a frame containing several side by side windows will shrink the frame
width by the width of one scroll bar provided this option is nil and
keep it unchanged if this option is either t or a list containing
vertical-scroll-bars.
In GTK+ and NS that use the external tool bar, the default value is
'(tab-bar-lines) which means that adding/removing a tab bar does
not change the frame height. On all other types of GUI frames, the
default value is '(tab-bar-lines tool-bar-lines) which means that
adding/removing a tool bar or tab bar does not change the frame
height. Otherwise it's t which means the frame size never changes
implicitly when there's no window system support.
Note that the size of fullscreen and maximized frames, the height of fullheight frames and the width of fullwidth frames never change implicitly. Note also that when a frame is not large enough to accommodate a change of any of the parameters listed above, Emacs may try to enlarge the frame even if this option is non-nil.
This variable was added, or its default value changed, in Emacs 31.1.
Probably introduced at or before Emacs version 25.1.
Source Code
// Defined in /usr/src/emacs/src/frame.c
DEFVAR_LISP ("frame-inhibit-implied-resize", frame_inhibit_implied_resize,
doc: /* Whether frames should be resized implicitly.
If this option is nil, setting font, menu bar, tool bar, tab bar,
internal borders, fringes or scroll bars of a specific frame may resize
the frame in order to preserve the number of columns or lines it
displays.
If this option is t, no such resizing happens once Emacs has agreed with
the window manager on the final initial size of a frame. That size will
have taken into account the size of the text area requested by the user
and the size of all decorations initially present on the frame.
If this is the symbol `force', no implicit resizing happens even before
a frame has obtained its final initial size. As a consequence, the
initial frame size may not necessarily be the one requested by the user.
This value can be useful with tiling window managers where the initial
size of a frame is determined by external means.
The value of this option can be also a list of frame parameters. In
this case, resizing is inhibited once a frame has obtained its final
initial size when changing a parameter that appears in that list. The
parameters currently handled by this option include `font',
`font-backend', `internal-border-width', `menu-bar-lines',
`tool-bar-lines' and `tab-bar-lines'.
Changing any of the parameters `scroll-bar-width', `scroll-bar-height',
`vertical-scroll-bars', `horizontal-scroll-bars', `left-fringe' and
`right-fringe' is handled as if the frame contained just one live
window. This means, for example, that removing vertical scroll bars on
a frame containing several side by side windows will shrink the frame
width by the width of one scroll bar provided this option is nil and
keep it unchanged if this option is either t or a list containing
`vertical-scroll-bars'.
In GTK+ and NS that use the external tool bar, the default value is
\\='(tab-bar-lines) which means that adding/removing a tab bar does
not change the frame height. On all other types of GUI frames, the
default value is \\='(tab-bar-lines tool-bar-lines) which means that
adding/removing a tool bar or tab bar does not change the frame
height. Otherwise it's t which means the frame size never changes
implicitly when there's no window system support.
Note that the size of fullscreen and maximized frames, the height of
fullheight frames and the width of fullwidth frames never change
implicitly. Note also that when a frame is not large enough to
accommodate a change of any of the parameters listed above, Emacs may
try to enlarge the frame even if this option is non-nil. */);