The Emacs manual says you can set the option frame-resize-pixelwise
to non-nil to allow frame sizes by pixel. Normally the frame dimensions (not counting the menu bar, tool bar, etc) are integer multiples of frame-char-height
in height and frame-char-width
in width. The manual notes that you need to set this variable to non-nil in your init file so that it interacts properly with you window manager.
In your init.el
or .emacs
file, add this:
(setq frame-resize-pixelwise t)
to enable pixel resizing rather than char height/width resizing.
User Option: frame-resize-pixelwise
If this option is nil, a frame’s size is usually rounded to a multiple of the current values of that frame’s frame-char-height and frame-char-width. If this is non-nil, no rounding occurs, hence frame sizes can increase/decrease by one pixel.
Setting this causes the next resize operation to pass the corresponding size hints to the window manager. This means that this variable should be set only in a user’s initial file; applications should never bind it temporarily.
The precise meaning of a value of nil for this option depends on the toolkit used. Dragging the frame border with the mouse is usually done character-wise. Calling set-frame-size (see below) with arguments that do not specify the frame size as an integer multiple of its character size, however, may: be ignored, cause a rounding (GTK+), or be accepted (Lucid, Motif, MS-Windows).
With some window managers you may have to set this to non-nil in order to make a frame appear truly “maximized” or “fullscreen”.