Fixed auto-hiding of windowed windows on OS X.
Merge remote-tracking branch 'upstream/master' into travis-osx