An application can provide a non-default visual to XtAppCreateShell and XtCreatePopupShell. That visual is then inherited by all the contained widgets that unconditionally use CopyFromParent. Only Shell actually has a visual resource.
To avoid a Bad Match or related error, all the operations that need a visual or an attribute of a visual (e.g., the color depth) have to remain compatible with the visual that the Shell has.
ThreeD, SmeThreeD, and Tip all use DefaultDepth and assume that this is the depth of the visual in use. The function Xaw3dXftDrawString uses both DefaultDepth and DefaultVisual and assumes them to be compatible.
Xaw3dXft.c uses DefaultScreen a lot instead of XtScreen(widget) or the screen resource.
Notably, none of these points are in code that was inherited from Xaw; all are in code that was added in Xaw3d or Xaw3dXft.
An application can provide a non-default visual to XtAppCreateShell and XtCreatePopupShell. That visual is then inherited by all the contained widgets that unconditionally use CopyFromParent. Only Shell actually has a visual resource.
To avoid a Bad Match or related error, all the operations that need a visual or an attribute of a visual (e.g., the color depth) have to remain compatible with the visual that the Shell has.
ThreeD, SmeThreeD, and Tip all use DefaultDepth and assume that this is the depth of the visual in use. The function Xaw3dXftDrawString uses both DefaultDepth and DefaultVisual and assumes them to be compatible.
Xaw3dXft.c uses DefaultScreen a lot instead of XtScreen(widget) or the screen resource.
Notably, none of these points are in code that was inherited from Xaw; all are in code that was added in Xaw3d or Xaw3dXft.