Markpad icon indicating copy to clipboard operation
Markpad copied to clipboard

Avoid a startup panic if a just-created window is no longer in the registry

Open PathGao opened this issue 4 months ago • 0 comments

The startup setup closure builds a Tauri window successfully, then immediately looks it up twice by label with app.get_webview_window(label).unwrap(). The newly returned window handle already supplies the same operations. If the registry changes during startup/teardown, the lookup can turn a recoverable lifecycle race into a process panic.

Use the handle returned by WebviewWindowBuilder::build() for theme, file delivery, focus, installer sizing, and centering. Add a regression test that rejects registry lookup unwraps in that setup path.

PathGao avatar Jul 31 '26 06:07 PathGao