Attaching wl_data_source multiple times concurrently
Some applications, such as those based on GDK, require wl_data_source::cancelled
to be sent to them to recognize that a received wl_data_offer
was created by another client. If they don't receive wl_data_source::cancelled
after attaching a wl_data_source
to a seat, they will never call wl_data_offer::receive
because they assume that the data offer refers to their own wl_data_source
.
Therefore sending wl_data_source::cancelled
is required. However I could not find any language in the spec explaining when exactly this event should be sent. The spec does not prohibit clients from attaching one data source for multiple purposes at the same time, e.g., attaching them to multiple seats or for both DnD and selection. Should cancelled
be sent as soon as at least one of these attachments gets replaced? If so then what is the behavior of the other attachments?