JAL-2797 added simple check for parent desktop to closing event