i3
|
#include <assert.h>
#include <xcb/xcb_cursor.h>
#include "i3.h"
#include "xcb.h"
#include "xcursor.h"
Go to the source code of this file.
Macros | |
#define | I3__FILE__ "xcursor.c" |
#define | LOAD_CURSOR(constant, name) |
Functions | |
void | xcursor_load_cursors (void) |
void | xcursor_set_root_cursor (int cursor_id) |
Sets the cursor of the root window to the 'pointer' cursor. More... | |
xcb_cursor_t | xcursor_get_cursor (enum xcursor_cursor_t c) |
int | xcursor_get_xcb_cursor (enum xcursor_cursor_t c) |
Variables | |
static xcb_cursor_context_t * | ctx |
static xcb_cursor_t | cursors [XCURSOR_CURSOR_MAX] |
static const int | xcb_cursors [XCURSOR_CURSOR_MAX] |
#define LOAD_CURSOR | ( | constant, | |
name | |||
) |
Referenced by xcursor_load_cursors().
xcb_cursor_t xcursor_get_cursor | ( | enum xcursor_cursor_t | c | ) |
Definition at line 63 of file xcursor.c.
References cursors, and XCURSOR_CURSOR_MAX.
Referenced by create_window(), drag_pointer(), and xcursor_set_root_cursor().
int xcursor_get_xcb_cursor | ( | enum xcursor_cursor_t | c | ) |
Definition at line 68 of file xcursor.c.
References xcb_cursors, and XCURSOR_CURSOR_MAX.
Referenced by create_window(), and xcb_set_root_cursor().
void xcursor_load_cursors | ( | void | ) |
Definition at line 29 of file xcursor.c.
References conn, ctx, ELOG, LOAD_CURSOR, root_screen, XCURSOR_CURSOR_BOTTOM_LEFT_CORNER, XCURSOR_CURSOR_BOTTOM_RIGHT_CORNER, XCURSOR_CURSOR_MOVE, XCURSOR_CURSOR_POINTER, XCURSOR_CURSOR_RESIZE_HORIZONTAL, XCURSOR_CURSOR_RESIZE_VERTICAL, XCURSOR_CURSOR_TOP_LEFT_CORNER, XCURSOR_CURSOR_TOP_RIGHT_CORNER, XCURSOR_CURSOR_WATCH, and xcursor_supported.
Referenced by main().
void xcursor_set_root_cursor | ( | int | cursor_id | ) |
Sets the cursor of the root window to the 'pointer' cursor.
This function is called when i3 is initialized, because with some login managers, the root window will not have a cursor otherwise.
We have a separate xcursor function to use the same X11 connection as the xcursor_load_cursors() function. If we mix the Xlib and the XCB connection, races might occur (even though we flush the Xlib connection).
Definition at line 58 of file xcursor.c.
References conn, root, and xcursor_get_cursor().
Referenced by main(), start_application(), and startup_monitor_event().
|
static |
Definition at line 19 of file xcursor.c.
Referenced by xcursor_load_cursors().
|
static |
Definition at line 20 of file xcursor.c.
Referenced by xcursor_get_cursor().
|
static |
Definition at line 22 of file xcursor.c.
Referenced by xcursor_get_xcb_cursor().