Skip to content

Defer native file dialogs to fix them reopening after a pick - #19

Merged
0x0Anna merged 2 commits into
mainfrom
fix-dialog-reopen-bug
Sep 16, 2026
Merged

0x0Anna merged 2 commits into
mainfrom
fix-dialog-reopen-bug

Conversation

@0x0Anna

@0x0Anna 0x0Anna commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • 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. 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.
  • 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.

Test plan

  • cargo build -p sde-app succeeds
  • cargo test --workspace passes (all crates, 0 failures)

Annalise 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
0x0Anna force-pushed the fix-dialog-reopen-bug branch from 8b11226 to be4d32e Compare September 16, 2026 02:03
@0x0Anna
0x0Anna merged commit c9b4cef into main Sep 16, 2026
7 checks passed
@0x0Anna
0x0Anna deleted the fix-dialog-reopen-bug branch September 16, 2026 02:24
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.

1 participant