convert X11 to SDL