Report question

Question: How to know whether window was closed by "x" button?