add willHideMainWindow: to the header