Reimplement X11 stuff on top of XCB