The only other location that FRAME_X_DISPLAY appears in non-X code is in the argument to Free_Pixmap in image.c, which can hopefully be refactored out in a later patch; at that point the other terms can remove their trivial FRAME_X_DISPLAY definitions.