Deactivate a window when minimizing it