Core: Restore main window state before showing.

Change-Id: I665ee724d9778bf391e6c77497ee012fe5a6edaf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>