From 055f02636457f5be1524d4f8798b0c650c4e2f8b Mon Sep 17 00:00:00 2001 From: dAxpeDDa Date: Mon, 10 Jul 2023 12:58:09 +0200 Subject: [PATCH] Fix Web backend --- src/platform_impl/web/window.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/platform_impl/web/window.rs b/src/platform_impl/web/window.rs index da5c0a0215..2fd1b18726 100644 --- a/src/platform_impl/web/window.rs +++ b/src/platform_impl/web/window.rs @@ -6,7 +6,9 @@ use crate::window::{ WindowAttributes, WindowButtons, WindowId as RootWI, WindowLevel, }; -use raw_window_handle::{RawDisplayHandle, RawWindowHandle, WebDisplayHandle, WebWindowHandle}; +use raw_window_handle::{ + HandleError, RawDisplayHandle, RawWindowHandle, WebDisplayHandle, WebWindowHandle, +}; use web_sys::HtmlCanvasElement; use super::r#async::Dispatcher; @@ -374,10 +376,10 @@ impl Window { } #[inline] - pub fn raw_window_handle(&self) -> RawWindowHandle { + pub fn raw_window_handle(&self) -> Result { let mut window_handle = WebWindowHandle::empty(); window_handle.id = self.id.0; - RawWindowHandle::Web(window_handle) + Ok(RawWindowHandle::Web(window_handle)) } #[inline]