I don't even know if this question belongs on here, but I didn't know where else to ask.

I have this weird problem in emacs, that the emacs window does not fill the entire screen using KDE-plasma on Arch Linux. The image tells more than a thousand words, so here it is:

enter image description here

As you can see, there is a small gap between the taskbar and emacs. This happens only with emacs though. I removed my entire config to see whether it stayed the same and well.. using vanilla emacs, it did. How do I even go about resolving this?


1 Answer 1


This is normal and expected. Emacs is restricting itself to frame sizes that are an even multiple of the font size in the frame. This is a feature that is only available on X Windows (and possibly Wayland; I’d have to double check that) and then only when the window manager cooperates. If your window manager displays the window size when you resize a window, it may show the size in character cells instead of pixels as well. If you pay attention, you’ll probably notice that certain other applications do the same thing, especially terminal emulators.

If the resulting gap is annoying you, you could pick a font size that divides the available space evenly. This might also involve adjusting the size(s) of other elements on the screen.

Or you could set frame-resize-pixelwise to a non–nil value.

  • Thank you. Probably the best answer I could have hoped for. :) May 28, 2023 at 23:05
  • I am not using KDE/Linux - but what about the functions toggle-frame-full-screen or toggle-frame-maximized, provided the frame-resize-pixelwise is set to a non-nil value, as suggested by @db48x - does these works in your OS?
    – Ian
    May 29, 2023 at 8:06
  • @Ian Well I just set 'frame-resize-pixelwise' to a non-nil value. I can try out the attributes you provided if you want me to. May 29, 2023 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.