mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
On Web, use the new WebCanvasWindowHandle (#3270)
This commit is contained in:
@@ -1530,10 +1530,7 @@ impl Window {
|
||||
#[cfg(feature = "rwh_06")]
|
||||
impl rwh_06::HasWindowHandle for Window {
|
||||
fn window_handle(&self) -> Result<rwh_06::WindowHandle<'_>, rwh_06::HandleError> {
|
||||
let raw = self
|
||||
.window
|
||||
.maybe_wait_on_main(|w| w.raw_window_handle_rwh_06().map(SendSyncWrapper))?
|
||||
.0;
|
||||
let raw = self.window.raw_window_handle_rwh_06()?;
|
||||
|
||||
// SAFETY: The window handle will never be deallocated while the window is alive.
|
||||
Ok(unsafe { rwh_06::WindowHandle::borrow_raw(raw) })
|
||||
|
||||
Reference in New Issue
Block a user