Minor bug fix:
The main window, will never be visible, when the user unchecked 'Show system try' and checked 'Start in tray'.
similar bug, when closing the window...
Cherry pick the first part of #762