2 #define I3__FILE__ "ewmh.c"
33 if (ws == focused_ws) {
34 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root,
51 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root,
71 xcb_delete_property(
conn,
root, A__NET_WORKAREA);
81 XCB_PROP_MODE_REPLACE,
97 XCB_PROP_MODE_REPLACE,
99 A__NET_CLIENT_LIST_STACKING,
111 xcb_atom_t supported_atoms[] = {
112 #define xmacro(atom) A_##atom,
113 #include "atoms.xmacro"
122 xcb_window_t child_window = xcb_generate_id(
conn);
125 XCB_COPY_FROM_PARENT,
130 XCB_WINDOW_CLASS_INPUT_ONLY,
131 XCB_COPY_FROM_PARENT,
134 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE, child_window, A__NET_SUPPORTING_WM_CHECK,
XCB_ATOM_WINDOW, 32, 1, &child_window);
135 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE, child_window, A__NET_WM_NAME, A_UTF8_STRING, 8, strlen(
"i3"),
"i3");
136 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A__NET_SUPPORTING_WM_CHECK,
XCB_ATOM_WINDOW, 32, 1, &child_window);
139 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A__NET_WM_NAME, A_UTF8_STRING, 8, strlen(
"i3"),
"i3");
141 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A__NET_SUPPORTED,
XCB_ATOM_ATOM, 32, 19, supported_atoms);
#define STARTS_WITH(string, needle)
void ewmh_update_client_list_stacking(xcb_window_t *stack, int num_windows)
Updates the _NET_CLIENT_LIST_STACKING hint.
Con * con_get_workspace(Con *con)
Gets the workspace container this node is on.
void ewmh_update_client_list(xcb_window_t *list, int num_windows)
Updates the _NET_CLIENT_LIST hint.
static struct stack_entry stack[10]
void ewmh_update_workarea(void)
i3 currently does not support _NET_WORKAREA, because it does not correspond to i3’s concept of worksp...
void ewmh_update_current_desktop(void)
Updates _NET_CURRENT_DESKTOP with the current desktop number.
void ewmh_setup_hints(void)
Set up the EWMH hints on the root window.
A 'Con' represents everything from the X11 root window down to a single X11 window.
Con * output_get_content(Con *output)
Returns the output container below the given output container.
#define TAILQ_FOREACH(var, head, field)
void ewmh_update_active_window(xcb_window_t window)
Updates _NET_ACTIVE_WINDOW with the currently focused window.
#define XCB_ATOM_CARDINAL