Closing a window through the close window control