carta
xcb_dbe_swap_buffers(3)

xcb_dbe_swap_buffers3

Swaps front and back buffers

Usage

Request function

xcb_void_cookie_t xcb_dbe_swap_buffers(xcb_connection_t *conn, uint32_t n_actions, const xcb_dbe_swap_info_t *actions);

Request arguments

conn

The XCB connection to X11.

n_actions

Number of swap actions in actions.

actions

List of windows on which to swap buffers.

Overview

Swaps the front and back buffers on the specified windows. The front and back buffers retain their ids, so that the window id continues to refer to the front buffer, while the back buffer id created by this extension continues to refer to the back buffer. Back buffer contents is moved to the front buffer. Back buffer contents after the operation depends on the given swap action. The optimal swap action depends on how each frame is rendered. For example, if the buffer is cleared and fully overwritten on every frame, the "untouched" action, which throws away the buffer contents, would provide the best performance. To eliminate visual artifacts, the swap will occure during the monitor VSync, if the X server supports detecting it.

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_dbe_swap_buffers_checked. See xcb-requests(3) for details.

Errors

This request does never generate any errors.

Author

Generated from dbe.xml. Contact [email protected] for corrections and improvements.

From libxcb 1.17.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.