Add glXWaitX before using texture_from_pixmap

This is needed to ensure all the data is on the pixmap before
we read it back from X via gl.