I don’t like wasting screen space so the very first configuration action I do in newly installed desktop environments is making all windows maximized by default.
After I had reinstalled my computer, I experienced a problem that new Emacs windows (or frames, in Emacs terminology) created after Emacs had started were not fully vertically maximized, being about two lines shorter than they should. It can be easily remedied by unmaximizing and then maximizing them again but since I use lots of Emacs windows it’s quite annoying to do that all the time.
Some initial observations were:
- The problem happened only for Emacs windows, not for other applications.
- The same Emacs version running on a different computer with a different KDE version and on the same monitor worked fine.
This was weird – is it a bug in Emacs or in KDE or in combination of both? Or was it an environment issue? I also suspected Emacs could get confused by a font change during startup or some other configuration change. But running
emacs -q proved the problem happens also in the default configuration.
Searching the web also didn’t help. Having no better choice, I tried miscellaneous actions in Emacs until I’ve discovered that the following Emacs setting fixes the problem:
(setq frame-resize-pixelwise t)
Which doesn’t make much sense because:
- The initial Emacs window is all right.
- The additional Emacs windows were shorter by more than one line.
- When a short window was unmaximized and maximized again, it got properly maximized.
So it looks like a bug, i.e. software problem of category 3. It’s hard to say where though and it may be bound to special environment properties so it would probably require a lot of time trying to report it. The workaround is good enough and I like the given setting anyway.