GetFrontProcess renamed to GetCurrentProcess to fix window closing
issue.
Implement propper minimizing and closing in OS X.