The only reason that you should specify the XmN-dragInitiatorProtocolStyle and
XmN-dragReceiverProtocolStyle resources in application code is if your application is going to
support only one of the drag protocols. In this case, you should set the resources to force the application to use
the supported protocol. You can retrieve the Display object for the application using XmGetXmDisplay()
and then use XtVaSetValues() to specify the resources. You can also use XtVaGetValues() to check
the values of the protocol resources.
If your application supports both drag protocols, you can specify the protocol resources in an app−defaults file
to indicate the application's preferred protocol. By default, an application uses the preregister protocol because
XmN-dragInitiatorProtocolStyle is set to XmDRAG_PREFER_RECEIVER and
XmN-dragReceiverProtocolStyle is set to XmDRAG_PREFER_PREREGISTER. If you have
implemented custom drag−under visuals with an XmN-dragProc, you should set the protocol resources to
XmDRAG_PREFER_DYNAMIC so that the dynamic protocol is used whenever possible. You can set these
resources in an app−defaults file as follows:
*DragInitiatorProtocolStyle: DRAG_PREFER_DYNAMIC
*DragReceiverProtocolStyle: DRAG_PREFER_DYNAMIC
If you set the protocol resources in an app−defaults file, users can specify their own values in a resource file. Users
that want to ensure good performance should specify a preference for the preregister protocol, while users that want
sophisticated drag−under effects should ...