Properly restore main window maximized state when it activated through tray icon