diff --git a/Cargo.toml b/Cargo.toml index 7ebc74e2e5..6a2854fa18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,11 +43,11 @@ slog-stdlog = { version = "4", optional = true } tempfile = { version = "3.0", optional = true } thiserror = "1.0.25" udev = { version = "0.6", optional = true } -wayland-egl = { version = "0.30.0-alpha8", optional = true } -wayland-protocols = { version = "0.30.0-alpha8", features = ["unstable_protocols", "server"], optional = true } -wayland-server = { version = "0.30.0-alpha8", optional = true } -wayland-sys = { version = "0.30.0-alpha8", optional = true } -wayland-backend = { version = "0.1.0-alpha8", optional = true } +wayland-egl = { version = "0.30.0-alpha9", optional = true } +wayland-protocols = { version = "0.30.0-alpha9", features = ["unstable_protocols", "server"], optional = true } +wayland-server = { version = "0.30.0-alpha9", optional = true } +wayland-sys = { version = "0.30.0-alpha9", optional = true } +wayland-backend = { version = "0.1.0-alpha9", optional = true } winit = { version = "0.26", optional = true } x11rb = { version = "0.9.0", optional = true } xkbcommon = "0.4.0" diff --git a/src/backend/winit/mod.rs b/src/backend/winit/mod.rs index dd0b76aebb..08aadb4fd5 100644 --- a/src/backend/winit/mod.rs +++ b/src/backend/winit/mod.rs @@ -56,6 +56,9 @@ pub enum Error { /// Failed to initialize a window #[error("Failed to initialize a window")] InitFailed(#[from] winit::error::OsError), + #[error("Failed to create a surface for the window")] + /// Surface creation error + Surface(Box), /// Context creation is not supported on the current window system #[error("Context creation is not supported on the current window system")] NotSupported, @@ -181,7 +184,8 @@ where let size = winit_window.inner_size(); let surface = unsafe { wegl::WlEglSurface::new_from_raw(wl_surface as *mut _, size.width as i32, size.height as i32) - }; + } + .map_err(|err| Error::Surface(err.into()))?; ( EGLSurface::new( &display,