diff --git a/Cargo.toml b/Cargo.toml index b1bcb6d..f4829f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,9 +44,9 @@ x11 = ["x11-dl", "xkb", "xkbcommon-sys"] wayland = ["wayland-client", "wayland-protocols", "wayland-cursor", "tempfile", "xkb", "xkbcommon-sys"] [target.'cfg(not(any(target_os = "macos", target_os = "redox", windows)))'.dependencies] -wayland-client = {version = "0.25", optional = true} -wayland-protocols = { version = "0.25", features = ["client", "unstable_protocols"], optional = true } -wayland-cursor = {version = "0.25", optional = true} +wayland-client = {version = "0.27", optional = true} +wayland-protocols = { version = "0.27", features = ["client", "unstable_protocols"], optional = true } +wayland-cursor = {version = "0.27", optional = true} tempfile = {version = "3.1.0", optional = true} xkb = {version = "0.2.1", optional = true} xkbcommon-sys = {version = "0.7", optional = true} diff --git a/src/os/posix/wayland.rs b/src/os/posix/wayland.rs index 8dbd986..c87c261 100644 --- a/src/os/posix/wayland.rs +++ b/src/os/posix/wayland.rs @@ -327,7 +327,7 @@ impl DisplayInfo { } }); - let cursor = wayland_cursor::load_theme(None, 16, &shm); + let cursor = wayland_cursor::CursorTheme::load(16, &shm); let cursor_surface = compositor.create_surface(); Ok(( @@ -365,13 +365,11 @@ impl DisplayInfo { fn update_cursor(&mut self, cursor: &str) -> std::result::Result<(), ()> { let cursor = self.cursor.get_cursor(cursor); if let Some(cursor) = cursor { - let img = cursor.frame_buffer(0); - if let Some(img) = img { - self.cursor_surface.attach(Some(&*img), 0, 0); - self.cursor_surface.damage(0, 0, 32, 32); - self.cursor_surface.commit(); - return Ok(()); - } + let img = &cursor[0]; + self.cursor_surface.attach(Some(&*img), 0, 0); + self.cursor_surface.damage(0, 0, 32, 32); + self.cursor_surface.commit(); + return Ok(()); } Err(()) }