Is there a difference between window and screen in computer graphics?
In this code, the "screen resolution" means the number of pixels in the output image (which happens to be a window in the windowing system), while the "window dimension" means the corresponding size in the 3D scene. Computing s tells you the ratio between one unit of 3D space in your scene and one pixel of output image. You need to do this in order to know how far apart in world-space to cast your primary rays.

These uses of "screen" and "window" aren't standard; they're specific to this code. No wonder you're confused.