x11rb::protocol::xproto

Function set_selection_owner

Source
pub fn set_selection_owner<Conn, A, B>(
    conn: &Conn,
    owner: A,
    selection: Atom,
    time: B,
) -> Result<VoidCookie<'_, Conn>, ConnectionError>
where Conn: RequestConnection + ?Sized, A: Into<Window>, B: Into<Timestamp>,
Expand description

Sets the owner of a selection.

Makes window the owner of the selection selection and updates the last-change time of the specified selection.

TODO: briefly explain what a selection is.

§Fields

  • selection - The selection.
  • owner - The new owner of the selection.

The special value XCB_NONE means that the selection will have no owner.

  • time - Timestamp to avoid race conditions when running X over the network.

The selection will not be changed if time is earlier than the current last-change time of the selection or is later than the current X server time. Otherwise, the last-change time is set to the specified time.

The special value XCB_CURRENT_TIME will be replaced with the current server time.

§Errors

  • Atom - selection does not refer to a valid atom.

§See

  • SetSelectionOwner: request