[Mac] show the window without the focus side effect

Fix #497

This fix also brings the window to front when launch from terminal