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

# XGetXCBConnection(3)

get the XCB connection for an Xlib Display

## NAME

XGetXCBConnection - get the XCB connection for an Xlib Display

## SYNTAX

 \#include \<X11/Xlib-xcb.h\>

xcb\_connection\_t \*XGetXCBConnection(Display \**dpy*);

## ARGUMENTS

- *dpy*

  Specifies the connection to the X server.

## DESCRIPTION

The *XGetXCBConnection* function returns the XCB connection associated with an Xlib Display. Clients can use this XCB connection with functions from the XCB library, just as they would with an XCB connection created with XCB. Callers of this function must link to libX11-xcb and a version of Xlib built with XCB support.

## SEE ALSO

[**XOpenDisplay**(3)](/XOpenDisplay/3.md), [**XSetEventQueueOwner**(3)](/XSetEventQueueOwner/3.md),\
 *Xlib - C Language X Interface*
