xcb\_set\_selection\_owner(3) XCB Requests xcb\_set\_selection\_owner(3)

# [NAME](#NAME)

xcb\_set\_selection\_owner - Sets the owner of a selection

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;xcb/xproto.h&gt;**

## [Request function](#Request_function)

xcb\_void\_cookie\_t **xcb\_set\_selection\_owner**(xcb\_connection\_t \**conn*, xcb\_window\_t *owner*, xcb\_atom\_t *selection*, xcb\_timestamp\_t *time*);

# [REQUEST ARGUMENTS](#REQUEST_ARGUMENTS)

[*conn*](#conn)

The XCB connection to X11.

[*owner*](#owner)

The new owner of the selection.

The special value *XCB\_NONE* means that the selection will have no owner.

[*selection*](#selection)

The selection.

[*time*](#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.

# [DESCRIPTION](#DESCRIPTION)

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.

# [RETURN VALUE](#RETURN_VALUE)

Returns an *xcb\_void\_cookie\_t*. Errors (if any) have to be handled in the event loop.

If you want to handle errors directly with *xcb\_request\_check* instead, use *xcb\_set\_selection\_owner\_checked*. See [**xcb-requests(3)**](/man/os/libxcb/xcb-requests.3) for details.

# [ERRORS](#ERRORS)

[*xcb\_atom\_error\_t*](#xcb_atom_error_t)

*selection* does not refer to a valid atom.

# [SEE ALSO](#SEE_ALSO)

[**xcb-requests**(3)](/man/os/libxcb/xcb-requests.3), [**xcb\_set\_selection\_owner**(3)](/man/os/libxcb/xcb_set_selection_owner.3)

# [AUTHOR](#AUTHOR)

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.

libxcb 1.17.0 X Version 11

---

Document: xcb_set_selection_owner_checked(3) from libxcb 1.17.0-r18 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libxcb.git
