Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

Motif FAQ (Part 6 of 9)
Section - 194) How can I disable Drag and Drop in my Motif 1.2 client ?

( Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Zip codes ]


Top Document: Motif FAQ (Part 6 of 9)
Previous Document: 193) Where can I find info and examples of the Motif drag and drop
Next Document: 195) Can I register client data for the Motif XmDropSite drop
See reader questions & answers on this topic! - Help others by sharing your knowledge
[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 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.)

User Contributions:

Comment about this article, ask questions, or add new information about this topic:




Top Document: Motif FAQ (Part 6 of 9)
Previous Document: 193) Where can I find info and examples of the Motif drag and drop
Next Document: 195) Can I register client data for the Motif XmDropSite drop

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
kenton@rahul.net (Ken Lee)





Last Update March 27 2014 @ 02:11 PM