- Added code to destroy the X window