opentk/opentk — pull request #124 by thefiddler (2014-05-19 20:07:27+00:00)
Title: [X11] Fixed BadWindow error on shutdown

This was caused by calling XDestroyWindow inside Dispose(), or
by processing events after calling XDestroyWindow. Pending events
are now discarded when Close() is called and not cancelled, and
XDestroyWindow is only called if the window exists.