Clip (almost) all XPutImage calls to the image boundaries.