Use shell listener, not dispose listener, to track window closing