Fixed window setting restoration when activating the window in the system tray