xcb\_get\_window\_attributes(3) XCB Requests xcb\_get\_window\_attributes(3)

# [NAME](#NAME)

xcb\_get\_window\_attributes - Gets window attributes

# [SYNOPSIS](#SYNOPSIS)

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

## [Request function](#Request_function)

xcb\_get\_window\_attributes\_cookie\_t **xcb\_get\_window\_attributes**(xcb\_connection\_t \**conn*, xcb\_window\_t *window*);

## [Reply datastructure](#Reply_datastructure)

```
typedef struct xcb_get_window_attributes_reply_t {


    uint8_t        response_type;


    uint8_t        backing_store;


    uint16_t       sequence;


    uint32_t       length;


    xcb_visualid_t visual;


    uint16_t       _class;


    uint8_t        bit_gravity;


    uint8_t        win_gravity;


    uint32_t       backing_planes;


    uint32_t       backing_pixel;


    uint8_t        save_under;


    uint8_t        map_is_installed;


    uint8_t        map_state;


    uint8_t        override_redirect;


    xcb_colormap_t colormap;


    uint32_t       all_event_masks;


    uint32_t       your_event_mask;


    uint16_t       do_not_propagate_mask;


    uint8_t        pad0[2];
} xcb_get_window_attributes_reply_t;
```

## [Reply function](#Reply_function)

xcb\_get\_window\_attributes\_reply\_t \***xcb\_get\_window\_attributes\_reply**(xcb\_connection\_t \**conn*, xcb\_get\_window\_attributes\_cookie\_t *cookie*, xcb\_generic\_error\_t \*\**e*);

# [REQUEST ARGUMENTS](#REQUEST_ARGUMENTS)

[*conn*](#conn)

The XCB connection to X11.

[*window*](#window)

The window to get the attributes from.

# [REPLY FIELDS](#REPLY_FIELDS)

[*response\_type*](#response_type)

The type of this reply, in this case *XCB\_GET\_WINDOW\_ATTRIBUTES*. This field is also present in the *xcb\_generic\_reply\_t* and can be used to tell replies apart from each other.

[*sequence*](#sequence)

The sequence number of the last request processed by the X11 server.

[*length*](#length)

The length of the reply, in words (a word is 4 bytes).

[*backing\_store*](#backing_store)

One of the following values:

[*XCB\_BACKING\_STORE\_NOT\_USEFUL*](#XCB_BACKING_STORE_NOT_USEFUL)

TODO: NOT YET DOCUMENTED.

[*XCB\_BACKING\_STORE\_WHEN\_MAPPED*](#XCB_BACKING_STORE_WHEN_MAPPED)

TODO: NOT YET DOCUMENTED.

[*XCB\_BACKING\_STORE\_ALWAYS*](#XCB_BACKING_STORE_ALWAYS)

TODO: NOT YET DOCUMENTED.

[*visual*](#visual)

The associated visual structure of *window*.

*\_class*

One of the following values:

[*XCB\_WINDOW\_CLASS\_COPY\_FROM\_PARENT*](#XCB_WINDOW_CLASS_COPY_FROM_PARENT)

TODO: NOT YET DOCUMENTED.

[*XCB\_WINDOW\_CLASS\_INPUT\_OUTPUT*](#XCB_WINDOW_CLASS_INPUT_OUTPUT)

TODO: NOT YET DOCUMENTED.

[*XCB\_WINDOW\_CLASS\_INPUT\_ONLY*](#XCB_WINDOW_CLASS_INPUT_ONLY)

TODO: NOT YET DOCUMENTED.

[*bit\_gravity*](#bit_gravity)

One of the following values:

[*XCB\_GRAVITY\_BIT\_FORGET*](#XCB_GRAVITY_BIT_FORGET)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_WIN\_UNMAP*](#XCB_GRAVITY_WIN_UNMAP)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_NORTH\_WEST*](#XCB_GRAVITY_NORTH_WEST)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_NORTH*](#XCB_GRAVITY_NORTH)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_NORTH\_EAST*](#XCB_GRAVITY_NORTH_EAST)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_WEST*](#XCB_GRAVITY_WEST)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_CENTER*](#XCB_GRAVITY_CENTER)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_EAST*](#XCB_GRAVITY_EAST)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_SOUTH\_WEST*](#XCB_GRAVITY_SOUTH_WEST)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_SOUTH*](#XCB_GRAVITY_SOUTH)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_SOUTH\_EAST*](#XCB_GRAVITY_SOUTH_EAST)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_STATIC*](#XCB_GRAVITY_STATIC)

TODO: NOT YET DOCUMENTED.

[*win\_gravity*](#win_gravity)

One of the following values:

[*XCB\_GRAVITY\_BIT\_FORGET*](#XCB_GRAVITY_BIT_FORGET~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_WIN\_UNMAP*](#XCB_GRAVITY_WIN_UNMAP~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_NORTH\_WEST*](#XCB_GRAVITY_NORTH_WEST~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_NORTH*](#XCB_GRAVITY_NORTH~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_NORTH\_EAST*](#XCB_GRAVITY_NORTH_EAST~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_WEST*](#XCB_GRAVITY_WEST~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_CENTER*](#XCB_GRAVITY_CENTER~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_EAST*](#XCB_GRAVITY_EAST~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_SOUTH\_WEST*](#XCB_GRAVITY_SOUTH_WEST~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_SOUTH*](#XCB_GRAVITY_SOUTH~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_SOUTH\_EAST*](#XCB_GRAVITY_SOUTH_EAST~2)

TODO: NOT YET DOCUMENTED.

[*XCB\_GRAVITY\_STATIC*](#XCB_GRAVITY_STATIC~2)

TODO: NOT YET DOCUMENTED.

[*backing\_planes*](#backing_planes)

Planes to be preserved if possible.

[*backing\_pixel*](#backing_pixel)

Value to be used when restoring planes.

[*save\_under*](#save_under)

Boolean, should bits under be saved?

[*map\_is\_installed*](#map_is_installed)

TODO: NOT YET DOCUMENTED.

[*map\_state*](#map_state)

One of the following values:

[*XCB\_MAP\_STATE\_UNMAPPED*](#XCB_MAP_STATE_UNMAPPED)

TODO: NOT YET DOCUMENTED.

[*XCB\_MAP\_STATE\_UNVIEWABLE*](#XCB_MAP_STATE_UNVIEWABLE)

TODO: NOT YET DOCUMENTED.

[*XCB\_MAP\_STATE\_VIEWABLE*](#XCB_MAP_STATE_VIEWABLE)

TODO: NOT YET DOCUMENTED.

[*override\_redirect*](#override_redirect)

Window managers should ignore this window if *override\_redirect* is 1.

[*colormap*](#colormap)

Color map to be associated with window.

[*all\_event\_masks*](#all_event_masks)

Set of events all people have interest in.

[*your\_event\_mask*](#your_event_mask)

My event mask.

[*do\_not\_propagate\_mask*](#do_not_propagate_mask)

Set of events that should not propagate.

# [DESCRIPTION](#DESCRIPTION)

Gets the current attributes for the specified *window*.

# [RETURN VALUE](#RETURN_VALUE)

Returns an *xcb\_get\_window\_attributes\_cookie\_t*. Errors have to be handled when calling the reply function *xcb\_get\_window\_attributes\_reply*.

If you want to handle errors in the event loop instead, use *xcb\_get\_window\_attributes\_unchecked*. See [**xcb-requests(3)**](/man/os/libxcb/xcb-requests.3) for details.

# [ERRORS](#ERRORS)

[*xcb\_drawable\_error\_t*](#xcb_drawable_error_t)

TODO: reasons?

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

The specified *window* does not exist.

# [SEE ALSO](#SEE_ALSO)

[**xcb-requests**(3)](/man/os/libxcb/xcb-requests.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_get_window_attributes_reply(3) from libxcb 1.17.0-r18 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libxcb.git
