almost working X11 rendering and input