fixup build on macos

This commit is contained in:
Wez Furlong committed 2021-05-08 09:36:20 -07:00
1 parent 058c3f612f
commit 655eef271f
2 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -222,7 +222,7 @@ async fn spawn_window() -> anyhow::Result<()> {
}
WindowEvent::Resized {
dimensions,
is_full_screen:_,
is_full_screen: _,
} => {
state.resize(dimensions);
}
+5 -2
View File
@@ -495,13 +495,16 @@ impl Window {
}
}
unsafe impl HasRawWindowHandle for WindowInner {
unsafe impl HasRawWindowHandle for Window {
fn raw_window_handle(&self) -> RawWindowHandle {
let conn = Connection::get().expect("raw_window_handle only callable on main thread");
let handle = conn.window_by_id(self.0).expect("window handle invalid!?");
let inner = handle.borrow();
inner.raw_window_handle()
let window_view =
WindowView::get_this(unsafe { &**inner.view }).expect("window view invalid!?");
window_view.inner.borrow().raw_window_handle()
}
}