xcb\_warp\_pointer(3) XCB Requests xcb\_warp\_pointer(3)

# [NAME](#NAME)

xcb\_warp\_pointer - move mouse pointer

# [SYNOPSIS](#SYNOPSIS)

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

## [Request function](#Request_function)

xcb\_void\_cookie\_t **xcb\_warp\_pointer**(xcb\_connection\_t \**conn*, xcb\_window\_t *src\_window*, xcb\_window\_t *dst\_window*, int16\_t *src\_x*, int16\_t *src\_y*, uint16\_t *src\_width*, uint16\_t *src\_height*, int16\_t *dst\_x*, int16\_t *dst\_y*);

# [REQUEST ARGUMENTS](#REQUEST_ARGUMENTS)

[*conn*](#conn)

The XCB connection to X11.

[*src\_window*](#src_window)

If *src\_window* is not *XCB\_NONE* (TODO), the move will only take place if the pointer is inside *src\_window* and within the rectangle specified by (*src\_x*, *src\_y*, *src\_width*, *src\_height*). The rectangle coordinates are relative to *src\_window*.

[*dst\_window*](#dst_window)

If *dst\_window* is not *XCB\_NONE* (TODO), the pointer will be moved to the offsets (*dst\_x*, *dst\_y*) relative to *dst\_window*. If *dst\_window* is *XCB\_NONE* (TODO), the pointer will be moved by the offsets (*dst\_x*, *dst\_y*) relative to the current position of the pointer.

[*src\_x*](#src_x)

TODO: NOT YET DOCUMENTED.

[*src\_y*](#src_y)

TODO: NOT YET DOCUMENTED.

[*src\_width*](#src_width)

TODO: NOT YET DOCUMENTED.

[*src\_height*](#src_height)

TODO: NOT YET DOCUMENTED.

[*dst\_x*](#dst_x)

TODO: NOT YET DOCUMENTED.

[*dst\_y*](#dst_y)

TODO: NOT YET DOCUMENTED.

# [DESCRIPTION](#DESCRIPTION)

Moves the mouse pointer to the specified position.

If *src\_window* is not *XCB\_NONE* (TODO), the move will only take place if the pointer is inside *src\_window* and within the rectangle specified by (*src\_x*, *src\_y*, *src\_width*, *src\_height*). The rectangle coordinates are relative to *src\_window*.

If *dst\_window* is not *XCB\_NONE* (TODO), the pointer will be moved to the offsets (*dst\_x*, *dst\_y*) relative to *dst\_window*. If *dst\_window* is *XCB\_NONE* (TODO), the pointer will be moved by the offsets (*dst\_x*, *dst\_y*) relative to the current position of the pointer.

# [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\_warp\_pointer\_checked*. See [**xcb-requests(3)**](/man/os/libxcb/xcb-requests.3) for details.

# [ERRORS](#ERRORS)

[*xcb\_window\_error\_t*](#xcb_window_error_t)

TODO: reasons?

# [SEE ALSO](#SEE_ALSO)

[**xcb-requests**(3)](/man/os/libxcb/xcb-requests.3), [**xcb\_set\_input\_focus**(3)](/man/os/libxcb/xcb_set_input_focus.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_warp_pointer(3) from libxcb 1.17.0-r19 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libxcb.git
