move X11 GL+window shutdown to end of event sequence