2 * vim:ts=4:sw=4:expandtab
4 * i3 - an improved dynamic tiling window manager
5 * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
7 * x.c: Interface to X11, transfers our in-memory state to X11 (see also
8 * render.c). Basically a big state machine.
15 /** Stores the X11 window ID of the currently focused window */
16 extern xcb_window_t focused_id;
19 * Initializes the X11 part for the given container. Called exactly once for
20 * every container from con_new().
23 void x_con_init(Con *con);
26 * Moves a child window from Container src to Container dest.
29 void x_move_win(Con *src, Con *dest);
32 * Reparents the child window of the given container (necessary for sticky
33 * containers). The reparenting happens in the next call of x_push_changes().
36 void x_reparent_child(Con *con, Con *old);
39 * Re-initializes the associated X window state for this container. You have
40 * to call this when you assign a client to an empty container to ensure that
41 * its state gets updated correctly.
44 void x_reinit(Con *con);
47 * Kills the window decoration associated with the given container.
50 void x_con_kill(Con *con);
53 * Completely reinitializes the container's frame, without destroying the old window.
56 void x_con_reframe(Con *con);
59 * Returns true if the client supports the given protocol atom (like WM_DELETE_WINDOW)
62 bool window_supports_protocol(xcb_window_t window, xcb_atom_t atom);
65 * Kills the given X11 window using WM_DELETE_WINDOW (if supported).
68 void x_window_kill(xcb_window_t window, kill_window_t kill_window);
71 * Draws the decoration of the given container onto its parent.
74 void x_draw_decoration(Con *con);
77 * Recursively calls x_draw_decoration. This cannot be done in x_push_node
78 * because x_push_node uses focus order to recurse (see the comment above)
79 * while drawing the decoration needs to happen in the actual order.
82 void x_deco_recurse(Con *con);
85 * This function pushes the properties of each node of the layout tree to
86 * X11 if they have changed (like the map state, position of the window, …).
87 * It recursively traverses all children of the given node.
90 void x_push_node(Con *con);
93 * Pushes all changes (state of each node, see x_push_node() and the window
97 void x_push_changes(Con *con);
100 * Raises the specified container in the internal stack of X windows. The
101 * next call to x_push_changes() will make the change visible in X11.
104 void x_raise_con(Con *con);
107 * Sets the WM_NAME property (so, no UTF8, but used only for debugging anyways)
108 * of the given name. Used for properly tagging the windows for easily spotting
109 * i3 windows in xwininfo -root -all.
112 void x_set_name(Con *con, const char *name);
115 * Set up the SHMLOG_PATH atom.
118 void update_shmlog_atom(void);
121 * Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
124 void x_set_i3_atoms(void);
127 * Set warp_to coordinates. This will trigger on the next call to
131 void x_set_warp_to(Rect *rect);
134 * Applies the given mask to the event mask of every i3 window decoration X11
135 * window. This is useful to disable EnterNotify while resizing so that focus
139 void x_mask_event_mask(uint32_t mask);
142 * Enables or disables nonrectangular shape of the container frame.
144 void x_set_shape(Con *con, xcb_shape_sk_t kind, bool enable);