xlib: Small cleanups, no functional changes.