we hide the window instead of closing it when we click the cross