Effect of two-dimensional inhomogeneous flow on surface waves