/For those interested, I've recently managed to port XCB (X protocol
C-language Binding) to Emacs [1], and it seems we can make use of it
to build low-level X11 applications. Besides, I've also implemented some
utility libraries [2] necessary for, e.g., building an X window
manager. Indeed, I'm currently working on an X window manager for
Emacs called EXWM [3], and have been using it for some while. I
should say that it basically works though it's far from stable./
https://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00122.html