When grabbing images, the image will be grabbed from the portion of the screen underlying the window, or from the system's video input, or from a random file on disk, as indicated by the grabDesktopImages, grabVideoFrames, and chooseRandomImages options in the ~/.xscreensaver file; see xscreensaver-demo(1) for more details.