
18.2.4 Converting the Selection (Selection Owner)
When the selection requestor posts a request, the request is sent via the X server to the client
which currently owns the selection.* If the request is sent to an XView-based application,
the toolkit will determine the appropriate selection-owner object to forward the request to. If
the selection-owner object has a conversion procedure registered (see SEL_CONVERT_PROC),
it will be called with information about the request. If the selection-owner object does not
have a conversion procedure defined, but does have selection items registered on behalf of
the selection owner, the toolkit will determine if the request matches any of the selection
items. If a match is made, the toolkit will respond to the request with the selection item’s
data. If a match is not made, the toolkit will reject the request.
If a selection-owner object uses selection items for all targets for which it is willing to
respond to, then there is no need to register a conversion procedure. If the selection-owner
object uses selection items for some responses and converts other responses in a conversion
procedure, then the default selection conversion procedure (sel_convert_proc()) must
be called from within the selection-owner object’s conversion procedure. This is where the
selection-owner object’s selection items are handled.
It is the responsibility of the selection owner