Aurélien Aptel wrote: > Are you sure this won't break the rest of the code? (which relies > heavily on clipping) It sure looks cleaner but the rest of the code > uses ns_focus/unfocus. Fairly sure. What's needed here is a temporary change to the graphics state in the middle of a redisplay; we change the clipping rectangle, draw the underwave, then restore the previous clipping rectangle, if any. ns_focus/ns_unfocus can't be used to do that; they're intended to be used at the beginning and end of redisplay.