How do I remove the gap around maximized Emacs frame on KDE?
I am using Emacs on Kubuntu. On startup, I maximize my Emacs frame with this command in my init.el
:
(custom-set-variables
...
'(initial-frame-alist (quote ((fullscreen . maximized)))))
This works, but leaves a small gap around the not quite maximized frame as you can see here:
Is there a way to completely maximize Emacs and remove this gap?
This is more of a workaround than a fix. As proposed by Bastian Beischer in this thread you can change how the window obeys the changes in geometry.
As some names of menu entries have changed, here is an updated version:
- Right click on the title bar.
- Select More Actions → Special Window Settings
- In the Size & Positions-Tab activate Obey Geometry Restrictions
- Set the value in the drop-down list to Force and keep the radio button next to it on No
This solved the problem for me. It worked for all instances of Emacs on my machine and did so persistently after restart. It also works on Ubuntu 16.04 with Plasma 5.5.5 and Emacs 25.2.
Edit:
I tried to figure out what the difference between Special Window Settings and Special Application Settings is. This answer over on SE Unix&Linux suggests this change would only apply for the specific window, but I could not reproduce this. For me it changes for all windows.