diff --git a/Cargo.toml b/Cargo.toml index aea83180..d03a6bb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -114,7 +114,7 @@ objc2-quartz-core = { version = "0.3.1", default-features = false, features = [ ] } [target.'cfg(all(unix, not(any(target_os = "macos", target_os = "android", target_env = "ohos"))))'.dependencies.wayland-sys] -version = "0.30" +version = "0.31" features = ["client", "dlopen", "egl"] [target.'cfg(all(unix, not(any(target_os = "macos", target_os = "android", target_env = "ohos"))))'.dependencies.x11-dl] diff --git a/src/platform/unix/wayland/connection.rs b/src/platform/unix/wayland/connection.rs index 6ed4a036..ebbc4082 100644 --- a/src/platform/unix/wayland/connection.rs +++ b/src/platform/unix/wayland/connection.rs @@ -15,7 +15,7 @@ use euclid::default::Size2D; use std::os::raw::c_void; use std::ptr; use std::sync::Arc; -use wayland_sys::client::{wl_display, wl_proxy, WAYLAND_CLIENT_HANDLE}; +use wayland_sys::client::{wayland_client_handle, wl_display, wl_proxy}; /// A connection to the Wayland server. #[derive(Clone)] @@ -38,7 +38,7 @@ impl Connection { #[inline] pub fn new() -> Result { unsafe { - let wayland_display = (WAYLAND_CLIENT_HANDLE.wl_display_connect)(ptr::null()); + let wayland_display = (wayland_client_handle().wl_display_connect)(ptr::null()); Connection::from_wayland_display(wayland_display, true) } } @@ -251,7 +251,7 @@ impl Drop for NativeConnectionWrapper { fn drop(&mut self) { unsafe { if let Some(wayland_display) = self.wayland_display { - (WAYLAND_CLIENT_HANDLE.wl_display_disconnect)(wayland_display); + (wayland_client_handle().wl_display_disconnect)(wayland_display); } } } diff --git a/src/platform/unix/wayland/surface.rs b/src/platform/unix/wayland/surface.rs index e1bafbe1..0fbb99d5 100644 --- a/src/platform/unix/wayland/surface.rs +++ b/src/platform/unix/wayland/surface.rs @@ -14,7 +14,7 @@ use glow::Texture; use std::marker::PhantomData; use std::os::raw::c_void; use wayland_sys::client::wl_proxy; -use wayland_sys::egl::{wl_egl_window, WAYLAND_EGL_HANDLE}; +use wayland_sys::egl::{wayland_egl_handle, wl_egl_window}; // FIXME(pcwalton): Is this right, or should it be `TEXTURE_EXTERNAL_OES`? const SURFACE_GL_TEXTURE_TARGET: u32 = gl::TEXTURE_2D; @@ -108,7 +108,7 @@ impl Device { size: &Size2D, ) -> Result { let egl_window = - (WAYLAND_EGL_HANDLE.wl_egl_window_create)(wayland_surface, size.width, size.height); + (wayland_egl_handle().wl_egl_window_create)(wayland_surface, size.width, size.height); assert!(!egl_window.is_null()); let context_descriptor = self.context_descriptor(context); @@ -170,7 +170,7 @@ impl Device { { unsafe { let wayland_egl_window = wayland_egl_window as *mut wl_egl_window; - (WAYLAND_EGL_HANDLE.wl_egl_window_destroy)(wayland_egl_window); + (wayland_egl_handle().wl_egl_window_destroy)(wayland_egl_window); } } Ok(()) @@ -216,7 +216,7 @@ impl Device { ) -> Result<(), Error> { let wayland_egl_window = surface.0.native_window()? as *mut c_void as *mut wl_egl_window; unsafe { - (WAYLAND_EGL_HANDLE.wl_egl_window_resize)( + (wayland_egl_handle().wl_egl_window_resize)( wayland_egl_window, size.width, size.height,