Relaxation of capillary-gravity waves due to contact line nonlinearity: A projection method