2 #define I3__FILE__ "ewmh.c"
30 if (ws == focused_ws) {
31 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root,
48 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root,
68 xcb_delete_property(
conn,
root, A__NET_WORKAREA);
78 XCB_PROP_MODE_REPLACE,
80 A__NET_CLIENT_LIST_STACKING,
92 xcb_atom_t supported_atoms[] = {
93 #define xmacro(atom) A_ ## atom,
94 #include "atoms.xmacro"
103 xcb_window_t child_window = xcb_generate_id(
conn);
106 XCB_COPY_FROM_PARENT,
111 XCB_WINDOW_CLASS_INPUT_ONLY,
112 XCB_COPY_FROM_PARENT,
115 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE, child_window, A__NET_SUPPORTING_WM_CHECK,
XCB_ATOM_WINDOW, 32, 1, &child_window);
116 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE, child_window, A__NET_WM_NAME, A_UTF8_STRING, 8, strlen(
"i3"),
"i3");
117 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A__NET_SUPPORTING_WM_CHECK,
XCB_ATOM_WINDOW, 32, 1, &child_window);
120 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A__NET_WM_NAME, A_UTF8_STRING, 8, strlen(
"i3"),
"i3");
122 xcb_change_property(
conn, XCB_PROP_MODE_REPLACE,
root, A__NET_SUPPORTED,
XCB_ATOM_ATOM, 32, 18, supported_atoms);
A 'Con' represents everything from the X11 root window down to a single X11 window.
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.
Con * con_get_workspace(Con *con)
Gets the workspace container this node is on.
void ewmh_update_active_window(xcb_window_t window)
Updates _NET_ACTIVE_WINDOW with the currently focused window.
void ewmh_update_client_list_stacking(xcb_window_t *stack, int num_windows)
Updates the _NET_CLIENT_LIST_STACKING hint.
static struct stack_entry stack[10]
#define TAILQ_FOREACH(var, head, field)
Con * output_get_content(Con *output)
Returns the output container below the given output container.
#define XCB_ATOM_CARDINAL