2 * vim:ts=4:sw=4:expandtab
4 * i3 - an improved dynamic tiling window manager
5 * © 2009-2013 Michael Stapelberg and contributors (see also: LICENSE)
7 * xcursor.c: libXcursor support for themed cursors.
12 #include <xcb/xcb_cursor.h>
14 enum xcursor_cursor_t {
15 XCURSOR_CURSOR_POINTER = 0,
16 XCURSOR_CURSOR_RESIZE_HORIZONTAL,
17 XCURSOR_CURSOR_RESIZE_VERTICAL,
18 XCURSOR_CURSOR_TOP_LEFT_CORNER,
19 XCURSOR_CURSOR_TOP_RIGHT_CORNER,
20 XCURSOR_CURSOR_BOTTOM_LEFT_CORNER,
21 XCURSOR_CURSOR_BOTTOM_RIGHT_CORNER,
27 void xcursor_load_cursors(void);
28 xcb_cursor_t xcursor_get_cursor(enum xcursor_cursor_t c);
29 int xcursor_get_xcb_cursor(enum xcursor_cursor_t c);
32 * Sets the cursor of the root window to the 'pointer' cursor.
34 * This function is called when i3 is initialized, because with some login
35 * managers, the root window will not have a cursor otherwise.
37 * We have a separate xcursor function to use the same X11 connection as the
38 * xcursor_load_cursors() function. If we mix the Xlib and the XCB connection,
39 * races might occur (even though we flush the Xlib connection).
42 void xcursor_set_root_cursor(int cursor_id);