Do you know how to use delegate methods? Note that hideOnDeactivate means that the application itself is dropping back behind another one, so you could either use a window delegate method or notification or an app delegate or notification. Refer to the guides and documentation to learn how to handle this.