Skip to content

Update wayland-sys to 0.31 #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions src/platform/unix/wayland/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -38,7 +38,7 @@ impl Connection {
#[inline]
pub fn new() -> Result<Connection, Error> {
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)
}
}
Expand Down Expand Up @@ -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);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/platform/unix/wayland/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -108,7 +108,7 @@ impl Device {
size: &Size2D<i32>,
) -> Result<Surface, Error> {
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);
Expand Down Expand Up @@ -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(())
Expand Down Expand Up @@ -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,
Expand Down
Loading