diff --git a/window/Cargo.toml b/window/Cargo.toml index 369225d5d..2968b081b 100644 --- a/window/Cargo.toml +++ b/window/Cargo.toml @@ -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" diff --git a/window/src/os/x11/cursor.rs b/window/src/os/x11/cursor.rs index 65801ed66..3491aaa3e 100644 --- a/window/src/os/x11/cursor.rs +++ b/window/src/os/x11/cursor.rs @@ -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, + // + 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();