Maintain the _NET_CLIENT_LIST property

Add and update the _NET_CLIENT_LIST property on the root window to
better comply with ewmh standards.

Information on this property can be found here:
http://standards.freedesktop.org/wm-spec/latest/ar01s03.html

> These arrays contain all X Windows managed by the Window Manager.
> _NET_CLIENT_LIST has initial mapping order, starting with the oldest window.

fixes #1099
This commit is contained in:
Tony Crisci
2014-04-08 14:27:40 -04:00
committed by Michael Stapelberg
parent 77abb2ef19
commit 819bc09375
5 changed files with 153 additions and 13 deletions

View File

@ -71,6 +71,22 @@ void ewmh_update_workarea(void) {
xcb_delete_property(conn, root, A__NET_WORKAREA);
}
/*
* Updates the _NET_CLIENT_LIST hint.
*
*/
void ewmh_update_client_list(xcb_window_t *list, int num_windows) {
xcb_change_property(
conn,
XCB_PROP_MODE_REPLACE,
root,
A__NET_CLIENT_LIST,
XCB_ATOM_WINDOW,
32,
num_windows,
list);
}
/*
* Updates the _NET_CLIENT_LIST_STACKING hint.
*
@ -122,5 +138,5 @@ void ewmh_setup_hints(void) {
/* Im not entirely sure if we need to keep _NET_WM_NAME on root. */
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A__NET_WM_NAME, A_UTF8_STRING, 8, strlen("i3"), "i3");
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A__NET_SUPPORTED, XCB_ATOM_ATOM, 32, 18, supported_atoms);
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A__NET_SUPPORTED, XCB_ATOM_ATOM, 32, 19, supported_atoms);
}