Moved x11 window creation into examples/common.