1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 13:21:38 +03:00

fixup build on macos

This commit is contained in:
Wez Furlong 2021-05-06 09:10:16 -07:00
parent 058c3f612f
commit 655eef271f
2 changed files with 6 additions and 3 deletions

View File

@ -222,7 +222,7 @@ async fn spawn_window() -> anyhow::Result<()> {
} }
WindowEvent::Resized { WindowEvent::Resized {
dimensions, dimensions,
is_full_screen:_, is_full_screen: _,
} => { } => {
state.resize(dimensions); state.resize(dimensions);
} }

View File

@ -495,13 +495,16 @@ impl Window {
} }
} }
unsafe impl HasRawWindowHandle for WindowInner { unsafe impl HasRawWindowHandle for Window {
fn raw_window_handle(&self) -> RawWindowHandle { fn raw_window_handle(&self) -> RawWindowHandle {
let conn = Connection::get().expect("raw_window_handle only callable on main thread"); 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 handle = conn.window_by_id(self.0).expect("window handle invalid!?");
let inner = handle.borrow(); 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()
} }
} }