Defer native file dialogs to fix them reopening after a pick - #19
Merged
Merged
Conversation
added 2 commits
September 15, 2026 21:02
All five places sde-app opens an rfd dialog (open file, set install root, open replay info, open/compare setup) did so synchronously from inside the Slint `clicked` handler. The blocking modal dialog runs on the same thread that pumps Slint's event loop, so on Windows the mouse-up from the click that opened it stayed queued until the dialog closed; Slint then processed it as a second click on the same button, popping the dialog straight back open and forcing the user to cancel it a second time to keep their pick. Defer each callback's body via `slint::Timer::single_shot` (zero duration) so the dialog only opens on the next event-loop tick, after the triggering click has fully resolved. Claude-Session: https://claude.ai/code/session_01TMZB9qMKPv42o6XDYzdh4B
0x0Anna
force-pushed
the
fix-dialog-reopen-bug
branch
from
September 16, 2026 02:03
8b11226 to
be4d32e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sde-appopens anrfddialog (open file, set install root, open replay info, open/compare setup) did so synchronously from inside the Slintclickedhandler. Because the blocking modal dialog runs on the same thread that pumps Slint's event loop, on Windows the mouse-up from the click that opened it stayed queued until the dialog closed; Slint then processed it as a second click on the same button, popping the dialog straight back open and requiring a second cancel to keep the pick.slint::Timer::single_shot(zero duration) so the dialog only opens on the next event-loop tick, after the triggering click has fully resolved.Test plan
cargo build -p sde-appsucceedscargo test --workspacepasses (all crates, 0 failures)