fix window reopen when click dock icon