---
name: "xcb_ungrab_pointer"
section: "3"
platform: "linux"
package: "libxcb"
version: "1.17.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/xcb_ungrab_pointer"
---

# xcb\_ungrab\_pointer(3)

release the pointer

## NAME

xcb\_ungrab\_pointer - release the pointer

## SYNOPSIS

**#include \<xcb/xproto.h\>**

### Request function

xcb\_void\_cookie\_t **xcb\_ungrab\_pointer**(xcb\_connection\_t \**conn*, xcb\_timestamp\_t *time*);\

## REQUEST ARGUMENTS

- *conn*

  The XCB connection to X11.

- *time*

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

  The pointer will not be released if *time* is earlier than the last-pointer-grab time or later than the current X server time.

## DESCRIPTION

Releases the pointer and any queued events if you actively grabbed the pointer before using *xcb\_grab\_pointer*, *xcb\_grab\_button* or within a normal button press.

EnterNotify and LeaveNotify events are generated.

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

## ERRORS

This request does never generate any errors.

## SEE ALSO

[**xcb-requests**(3)](/xcb-requests/3.md), [**xcb\_enter\_notify\_event\_t**(3)](/xcb_enter_notify_event_t/3.md), [**xcb\_grab\_button**(3)](/xcb_grab_button/3.md), [**xcb\_grab\_pointer**(3)](/xcb_grab_pointer/3.md), **xcb\_leave\_notify\_event\_t**(3)

## AUTHOR

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