Parent document is top of "Motif FAQ (Part 6 of 9)"
Previous document is "195) Where can I find info and examples of the Motif drag and drop"
Next document is "197) Can I register client data for the Motif XmDropSite drop"

196) How can I disable Drag and Drop in my Motif 1.2 client ?

[Last modified: Oct 94]

Answer:  Several people have reported that for complex hierarchies of widgets,
drag and drop can slow down an application considerably. If you do not need
drag and drop's significant power, you can disable it in your application.

Set the XmDisplay drag-protocol resources to XmDRAG_NONE.  The following code
fragment demonstrates this:

#include <Xm/Display.h>


    dw = XmGetXmDisplay(XtDisplay(shell));
    /* where "shell" is your client's top-level shell. */

    XtVaSetValues(dw, XmNdragInitiatorProtocolStyle, XmDRAG_NONE, NULL);
    XtVaSetValues(dw, XmNdragReceiverProtocolStyle,  XmDRAG_NONE, NULL);


Thanks to Lance Purple (purple@austin.ibm.com)

Ken Lee (http://www.rahul.net/kenton/) and Christoph Widmer
(widmer@einsteinium.SLCS.SLB.COM) describe how to disable drag and drop from a
resource file:

        *dragInitiatorProtocolStyle: XmDRAG_NONE
        *dragReceiverProtocolStyle:  XmDRAG_NONE

Ken Lee also notes that as of Motif 1.2, the "Xm" prefix is required for all
token constants in resource files. (Which is why specifying "DRAG_NONE" won't
work but "XmDRAG_NONE" will.)

Parent document is top of "Motif FAQ (Part 6 of 9)"
Previous document is "195) Where can I find info and examples of the Motif drag and drop"
Next document is "197) Can I register client data for the Motif XmDropSite drop"