Inlining x11 thread functions.