mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 21:32:13 +03:00
use xcb-util's cursor constants
This commit is contained in:
parent
3f3de0f544
commit
387579cfb4
@ -54,7 +54,7 @@ shared_library = "0.1"
|
||||
filedescriptor = { version="0.7", path = "../filedescriptor" }
|
||||
x11 = {version ="2.18", features = ["xlib_xcb"]}
|
||||
xcb = {version="0.9", features=["shm", "xkb", "xlib_xcb"]}
|
||||
xcb-util = { features = [ "icccm", "ewmh", "keysyms", "shm"], version = "0.3" }
|
||||
xcb-util = { features = [ "cursor", "icccm", "ewmh", "keysyms", "shm"], version = "0.3" }
|
||||
xkbcommon = { version = "0.5", features = ["x11", "wayland"], git="https://github.com/wez/xkbcommon-rs.git", rev="01a0a0cd5663405e6e4abb1ad3add9add1496f58"}
|
||||
mio = "0.6"
|
||||
libc = "0.2"
|
||||
|
@ -52,11 +52,12 @@ impl CursorInfo {
|
||||
None => {
|
||||
let id_no = match cursor.unwrap_or(MouseCursor::Arrow) {
|
||||
// `/usr/include/X11/cursorfont.h`
|
||||
MouseCursor::Arrow => 132,
|
||||
MouseCursor::Hand => 58,
|
||||
MouseCursor::Text => 152,
|
||||
MouseCursor::SizeUpDown => 116,
|
||||
MouseCursor::SizeLeftRight => 108,
|
||||
// <https://docs.rs/xcb-util/0.3.0/src/xcb_util/cursor.rs.html>
|
||||
MouseCursor::Arrow => xcb_util::cursor::TOP_LEFT_ARROW,
|
||||
MouseCursor::Hand => xcb_util::cursor::HAND1,
|
||||
MouseCursor::Text => xcb_util::cursor::XTERM,
|
||||
MouseCursor::SizeUpDown => xcb_util::cursor::SB_V_DOUBLE_ARROW,
|
||||
MouseCursor::SizeLeftRight => xcb_util::cursor::SB_H_DOUBLE_ARROW,
|
||||
};
|
||||
|
||||
let cursor_id: xcb::ffi::xcb_cursor_t = conn.generate_id();
|
||||
|
Loading…
Reference in New Issue
Block a user