Keywords: LessTif

Next: 3. Changing the Operation Up: 3. The Drag Protocol Previous: 1. Entering/Leaving Top Level Contents Index

## 2. Pointer Motion

When the pointer moves, the initiator sends XmDRAG_MOTION messages to the receiver (which is the top level window the pointer is currently in and which is willing to accept drag messages).

XmDRAG_MOTION

Table: The XmDRAG_MOTION message send by the initiator.
Message User Data | Size | Description
data.b[0] | BYTE | Reason: XmDRAG_MOTION (0x02)
data.b[1] | BYTE | Byte Order: either 'B' (MSB first) or 'l' (LSB first).
data.b[2..3] | CARD16 | DnD Flags: 1 + 3
data.b[4..7] | CARD32 | Timestamp: set to the timestamp of the corresponding X event triggering this message.
data.b[8..9] | CARD16 | Root X: x position of the drag-over icon relative to the root window.
data.b[10..11] | CARD16 | Root Y: y position relative to the root window.

Whenever the initiator sends a XmDRAG_MOTION message, the receiver responds with one out of three different messages, depending on whether the pointer entered or left a valid drop site (XmDROP_SITE_ENTER, XmDROP_SITE_LEAVE), or just moved around (XmDRAG_MOTION).

XmDROP_SITE_ENTER

Table: The XmDROP_SITE_ENTER message replied by the receiver.
Message User Data | Size | Description
data.b[0] | BYTE | Reason: XmDROP_SITE_ENTER (0x83)
data.b[1] | BYTE | Byte Order: either 'B' (MSB first) or 'l' (LSB first).
data.b[2..3] | CARD16 | DnD Flags: 1 + 2 + 3
data.b[4..7] | CARD32 | Timestamp: set to the timestamp of the corresponding X event triggering this message.
data.b[8..9] | CARD16 | Root X: better x position (hint for the initiator) of the drag-over icon relative to the root window.
data.b[10..11] | CARD16 | Root Y: better y position relative to the root window.

XmDROP_SITE_LEAVE

Table: The XmDROP_SITE_LEAVE message replied by the receiver.
Message User Data | Size | Description
data.b[0] | BYTE | Reason: XmDROP_SITE_LEAVE (0x84)
data.b[1] | BYTE | Byte Order: either 'B' (MSB first) or 'l' (LSB first).
data.b[2..3] | CARD16 | (DnD Flags: unused)
data.b[4..7] | CARD32 | Timestamp: set to the timestamp of the corresponding X event triggering this message.

XmDRAG_MOTION

Table: The XmDRAG_MOTION message echoed by the receiver.
Message User Data | Size | Description
data.b[0] | BYTE | Reason: XmDRAG_MOTION (0x82)
data.b[1] | BYTE | Byte Order: either 'B' (MSB first) or 'l' (LSB first).
data.b[2..3] | CARD16 | DnD Flags: 1 + 2 + 3
data.b[4..7] | CARD32 | Timestamp: set to the timestamp of the corresponding X event triggering this message.
data.b[8..9] | CARD16 | Root X: better x position (hint for the initiator) of the drag-over icon relative to the root window.
data.b[10..11] | CARD16 | Root Y: better y position relative to the root window.

Next: 3. Changing the Operation Up: 3. The Drag Protocol Previous: 1. Entering/Leaving Top Level Contents Index