On Web, use the new WebCanvasWindowHandle (#3270)
This commit is contained in:
parent
2c15de7cf9
commit
8cd3aaa8a2
8 changed files with 54 additions and 20 deletions
|
|
@ -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) })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue