4

GUI Emacs running maximized on my Linux (centos7+kde) is not using all the available space leaving some space around the borders, specially at the top and the bottom.

Sample of GUI emacs running "maximized" where you can still see the desktop wallpaper (and you should not):

emacs running maximized

All other apps (kde, gnome, etc) don't have this problem, when you click on maximize button, you cannot see the desktop wallpaper (expected behaviour).

In both cases (emacs and any other app) I use the maximize button provided by the OS. Using M-x toggle-frame-maximized as suggested has the same (wrong) effect. Using M-x toggle-frame-fullscreen works better in that emacs uses all the screen, but hides the window frame and the OS panel at the bottom, which is not what I want, I just want it to run maximized.

Appreciate if anyone knows how to make GUI Emacs use all the space available when running maximized.

  • Please edit your question to explain how you maximized the Emacs frame. I suspect you will be looking for toggle-frame-fullscreen. – Dan Aug 4 '17 at 16:19
  • Thanks for comment @Dan , the question you mention is about full screen, not maximize. Related but not the same. Please consider unmark it as duplicate. – DenverCoder9 Aug 4 '17 at 22:42
  • 2
    Found solution here: github.com/syl20bnr/spacemacs/issues/5633 Turns out problem was selected font and the command (setq frame-resize-pixelwise t) solves the issue. – DenverCoder9 Aug 4 '17 at 23:34
  • Go ahead and post your comment as an answer, but please add a little background explanation for others that might come across this post in the future. Once the system lets you, please go ahead and accept your own answer. – Dan Aug 5 '17 at 1:06
5

Found solution on this github: The window frame cannot be maximized 100% to suit the whole screen

Seems like the problem was the selected font and setting the variable "frame-resize-pixelwise" to anything other than nul (default) solves the issue. I have added this line to my .emacs as suggested there:

(setq frame-resize-pixelwise t)

After restart emacs (just load the config file was not working for me on this one), hitting the maximize button or executing the emacs maximize command "M-x toggle-frame-maximize" works as expected and emacs uses all available space so desktop wallpaper hides completely

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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