Skip to content

native-activity: don't panic on window resize/redraw outside documented lifecycle#248

Open
SAY-5 wants to merge 1 commit intorust-mobile:mainfrom
SAY-5:say5/native-activity-window-lifecycle-247
Open

native-activity: don't panic on window resize/redraw outside documented lifecycle#248
SAY-5 wants to merge 1 commit intorust-mobile:mainfrom
SAY-5:say5/native-activity-window-lifecycle-247

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 2, 2026

Fixes #247.

notify_window_resized and notify_window_redraw_needed unconditionally unwrap() guard.window. Some platforms (Meta Quest 3 HorizonOS) deliver onNativeWindowResized outside the documented onNativeWindowCreatedonNativeWindowDestroyed window. The unwrap panics across the FFI boundary and panic_cannot_unwind aborts the process. Drop the event when the window pointer doesn't match the current window.

…ed lifecycle

Signed-off-by: SAY-5 <say.apm35@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

notify_window_resized panics (unwrap on None) on Meta Quest 3 HorizonOS — fires onNativeWindowResized outside documented window lifecycle

1 participant