mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-30 21:07:04 -06:00
* File dialogs no longer block the event loop (#673, #574) Open, Save As, Export As, Place and every other file dialog ran rfd's synchronous dialog inside winit's event handler. On macOS that runs AppKit's modal loop there, and an event arriving meanwhile aborted the app (SIGABRT, panic_cannot_unwind); on Linux the frozen event loop made compositors offer to kill the app. The platform shell now shows dialogs through one asynchronous Services::file_dialog: the request is queued with what to do with the answer, shown at the end of the frame with the window as its parent (a sheet on macOS, an owned modal dialog elsewhere) and awaited on a helper thread; the answer comes back through a channel that wakes the app, which continues the action on a later frame. One dialog at a time. The unsaved-changes prompt waits behind Save's dialog and closes the document only once it saved. The web build uses the same service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * brush picker: Import ignores the Open dialog's result, like the other callers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>