Simplified concise functions into verbose switch-case statements. This is literal jeet code.

https://github.com/X11Libre/xserver/commit/5b4696368a6ab1a7302059ee39129706feb224cb