|
The :selection-request event is reported to the owner
of a selection when a client calls
convert-selection. This event requests the selection
owner to convert the current value of a selection into a
specified form and to return it to the requestor. A client can
neither select :selection-request events nor avoid receiving them.
The selection owner should respond to a :selection-request event by performing the
following steps:
-
Convert the current selection value to the target
type.
-
Store the converted selection value in the property.
If property is nil, then the owner should
choose the property.
-
Call
send-event to send a :selection-notify event to the requestor
containing the property with the converted value. If
the selection could not be converted to the target
type, then a nil property should be sent.
The :selection, :target, and :time
arguments to
send-event should be the same as those received in
the :selection-request event. The event-mask argument
to send-event
should be nil; that is, the :selection-notify event should be sent to client
that created the requestor.
NOTE: Standard conventions for inter-client
communication require the following additional steps in
processing a :selection-request event:
-
The property used to store the selection value must belong to
the requestor.
-
If the property is nil, the target type atom
should be used as the property name.
-
If the window did not actually own the selection at the given
time, the request should be refused, just as if it could not
be converted to the target type.
-
window, event-window
-
Type window.
The selection owner receiving the event.
-
requestor
-
Type window.
The window requesting the converted selection.
-
selection
-
Type keyword. The selection to be converted.
-
target
-
Type keyword. An xatom specifying the type of the converted
selection value.
-
property
-
Type (or null keyword). A requestor window property.
-
time
-
Type timestamp
. The timestamp sent in the client
convert-selection request.
|