The Wigner function is a useful tool to analyze partially coherent light. Particularly the propagation of light in optical systems can be described by the Wigner function, while including effects of coherence and diffraction. Here we concentrate on discontinuous optical surfaces where diffraction effects can be dominant, such as the kinoform lenses, gratings, and lens arrays. To calculate the change of the Wigner function in an optical system, we treat the optical components as thin phase elements. A Wigner function describes signals in space vs. spatial frequency, resembling position vs. angle in geometrical optics. Therefore the ABCD matrix can be used to model the paraxial propagation of partially coherent light. This propagation can be computed efficiently with a shearing transformation. However, the implementation of Wigner functions for a highly convergent or divergent beam requires many sampling points. To overcome this drawback, we apply a method to remove the parabolic wavefront from the beam, transforming it into a quasi-collimated beam without losing physical effects or computational accuracy. We discuss a kinoform lens as a first example with the partially coherent light. The Wigner function vividly visualizes the essential effects such as the focal shift and multiple foci for wavelengths different from the design wavelength. As another example for Wigner functions, we analyze the lens arrays for beam homogenizing. The Wigner functions visualize the beam-shaping contribution of individual lenslets including their diffraction effects. In conclusion, the Wigner function offers a convenient approach to analyze the design of components where diffraction effects are important.