The Problem
For ages, I was annoyed that neither gvim nor xterm maximised properly in some desktop environment (KDE being one of them). They both have a small "gap" around the outermost screen edges. It is not only visually annoying, but I am also used to "throw" the mouse to the top corner to grab the title-bar. But because this small gap exists, I always end up clicking anything which lies behind that window.
The reason this happens, is because the applications give the window manager resizing hints. And because both applications are resized based on characters, and not based on pixels, the WM tries it's best to fill as much screen as possible. But only changing the size by the increments given by the application. This depends on font and font-size. It is unlikely that the width and height of the characters can perfectly fill the screen.
Solution
KDE offers you a way to ignore those hints.
When the application is open, right-click on the title bar, select "More Actions", and "Special Application Settings". This will open up a dialog for this application".
The "Size & Position" tab contains the option we are looking for: "Obey geometry restrictions".
Override the WM default by ticking the checkbox and selecting "Force" in the drop-down menu and setting the value to "No".
End-Result
After changing these values you can try to maximise the window (or restore, then maximise again). It should now fill the screen up to the last pixel, closuing up the gap.
This fix is applicable to all applications which force size increments on your window. For me, this was both gvim and xterm, but it will surely also fix issues with emacs.
This fix is also not exclusive to KDE. For example "awesome" allows you to do the same via config files, and I am sure other WMs let you override this as well.