---
name: "xcb_configure_window"
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_configure_window"
---

# xcb\_configure\_window(3)

Configures window attributes

## NAME

xcb\_configure\_window - Configures window attributes

## SYNOPSIS

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

### Request function

xcb\_void\_cookie\_t **xcb\_configure\_window**(xcb\_connection\_t \**conn*, xcb\_window\_t *window*, uint16\_t *value\_mask*, const void \**value\_list*);\

## REQUEST ARGUMENTS

- *conn*

  The XCB connection to X11.

- *window*

  The window to configure.

- *value\_mask*

  Bitmask of attributes to change.

- *value\_list*

  New values, corresponding to the attributes in value\_mask. The order has to correspond to the order of possible *value\_mask* bits. See the example.

## DESCRIPTION

Configures a window's size, position, border width and stacking order.

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

## ERRORS

- *xcb\_match\_error\_t*

  You specified a Sibling without also specifying StackMode or the window is not actually a Sibling.

- *xcb\_value\_error\_t*

  TODO: reasons?

- *xcb\_window\_error\_t*

  The specified window does not exist. TODO: any other reason?

## EXAMPLE

```

/*
 * Configures the given window to the left upper corner
 * with a size of 1024x768 pixels.
 *
 */
void my_example(xcb_connection_t *c, xcb_window_t window) {
    uint16_t mask = 0;
    mask |= XCB_CONFIG_WINDOW_X;
    mask |= XCB_CONFIG_WINDOW_Y;
    mask |= XCB_CONFIG_WINDOW_WIDTH;
    mask |= XCB_CONFIG_WINDOW_HEIGHT;
    const uint32_t values[] = {
        0,    /* x */
        0,    /* y */
        1024, /* width */
        768   /* height */
    };
    xcb_configure_window(c, window, mask, values);
    xcb_flush(c);
}
```

## SEE ALSO

[**xcb-requests**(3)](/xcb-requests/3.md), [**xcb-examples**(3)](/xcb-examples/3.md), [**xcb\_expose\_event\_t**(3)](/xcb_expose_event_t/3.md), [**xcb\_map\_notify\_event\_t**(3)](/xcb_map_notify_event_t/3.md)

## AUTHOR

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