Skip to content

Commit

Permalink
Fix Web backend
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda authored Jul 10, 2023
1 parent cf5ff36 commit e215150
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/platform_impl/web/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -374,10 +376,10 @@ impl Window {
}

#[inline]
pub fn raw_window_handle(&self) -> RawWindowHandle {
pub fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError> {
let mut window_handle = WebWindowHandle::empty();
window_handle.id = self.id.0;
RawWindowHandle::Web(window_handle)
Ok(RawWindowHandle::Web(window_handle))
}

#[inline]
Expand Down

0 comments on commit e215150

Please sign in to comment.