diff --git a/reflector-platform/src/backend/cocoa/window.rs b/reflector-platform/src/backend/cocoa/window.rs
index 8fc82c5..4d087e5 100644
--- a/reflector-platform/src/backend/cocoa/window.rs
+++ b/reflector-platform/src/backend/cocoa/window.rs
@@ -19,7 +19,6 @@ use objc2_app_kit::{
};
use objc2_foundation::{NSInteger, NSPoint, NSRect, NSSize, NSString};
-use super::app::{AppInner, AppState};
use super::surface::Surface;
use super::OsError;
use crate::{
@@ -180,7 +179,7 @@ impl View {
let result = panic::catch_unwind(AssertUnwindSafe(f));
if let Err(panic) = result {
- self.state().app_state.propagate_panic(panic);
+ self.state().app.inner.state.propagate_panic(panic);
}
}
@@ -189,11 +188,8 @@ impl View {
let state = Rc::clone(&state_rc);
let _ = Rc::into_raw(state_rc);
- let app = AppHandle::from_inner(AppInner {
- state: Rc::clone(&state.app_state),
- });
let window = Window::from_inner(WindowInner { state });
- let cx = WindowContext::new(&app, &window);
+ let cx = WindowContext::new(&window.inner.state.app, &window);
window.inner.state.handle_event(&cx, event)
}
@@ -371,7 +367,7 @@ pub struct WindowState {
window: RefCell