do not crash on window-close; instead, hide the window