Fix to stop fgSetWindow(NULL) crashing on X11.