xcb\_configure\_window(3) XCB Requests xcb\_configure\_window(3)

# [NAME](#NAME)

xcb\_configure\_window - Configures window attributes

# [SYNOPSIS](#SYNOPSIS)

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

## [Request function](#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](#REQUEST_ARGUMENTS)

[*conn*](#conn)

The XCB connection to X11.

[*window*](#window)

The window to configure.

[*value\_mask*](#value_mask)

Bitmask of attributes to change.

[*value\_list*](#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](#DESCRIPTION)

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

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

# [ERRORS](#ERRORS)

[*xcb\_match\_error\_t*](#xcb_match_error_t)

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

[*xcb\_value\_error\_t*](#xcb_value_error_t)

TODO: reasons?

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

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

# [EXAMPLE](#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](#SEE_ALSO)

[**xcb-requests**(3)](/man/os/libxcb/xcb-requests.3), [**xcb-examples**(3)](/man/os/libxcb/xcb-examples.3), [**xcb\_expose\_event\_t**(3)](/man/os/libxcb/xcb_expose_event_t.3), [**xcb\_map\_notify\_event\_t**(3)](/man/os/libxcb/xcb_map_notify_event_t.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_configure_window_checked(3) from libxcb 1.17.0-r17 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libxcb.git
