Remove cleanup and deglobalize and rework data structures
authorFRIGN <dev@frign.de>
Sun, 11 Sep 2016 21:08:19 +0000 (23:08 +0200)
committerMarkus Teich <markus.teich@stusta.mhn.de>
Fri, 23 Sep 2016 16:39:01 +0000 (18:39 +0200)
The cleanup removal is a joint-venture with Markus. We assume the X server does
the cleanup, so we don't need it. The idea is that the fds are closed at exit
and thus already indicate to the X server that the client has quit. Analogously
the same applies to freeing memory sections previously allocated for the X
server.

We love XXXXXL burgers and therefore removed
XUngrabPointer
XUngrabKeyboard
XFreeColors
XFreePixmap
XDestroyWindow
Lines of Code.

For a project like slock there is no need to carry around global state. By
moving the three structures to main() it is now clear which functions modify
which state, greatly improving the readability of the code, especially given
slock is a suid program.


No differences found