Multi-device aware. Orthogonal to rest of wayland, as it is its own toplevel object. Since the compositor determines the drag target, it works with transformed surfaces (dragging to a scaled down window in expose mode, for example).
Issues:
New objects, requests and events:
drag.destroy(id), destroy drag object.
drag.send(id, data), send drag data.
drag.accept(id, mime type), accept drag offer, called by target surface.
drag.offer(id, mime-types), sent to potential destination surfaces to offer drag data. If the device leaves the window or the originator cancels the drag, this event is sent with mime-types = NULL.
drag.target(id, mime-type), sent to drag originator when a target surface has accepted the offer. if a previous target goes away, this event is sent with mime-type = NULL.
drag.data(id, data), sent to target, contains dragged data. ends transaction on the target side.
Sequence of events:
The special mime-type application/x-root-target indicates that the initiator is looking for drag events to the root window as well.
If the initiator listed application/x-root-target as a valid mime-type, dragging into the root window will make the drag object send a target event with the application/x-root-target mime-type.
MIME is defined in RFC's 2045-2049. A registry of MIME types is maintained by the Internet Assigned Numbers Authority (IANA).
ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/
root 2012-01-26