Restore window state after new connection is created