Delay folder registration until owner restoration - #624
Merged
Merged
Conversation
Co-authored-by: Copilot App <[email protected]> Signed-off-by: Colin Neilens <[email protected]>
3 of 5 tasks
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
Prevents the Windows shell from registering a selected folder before USER32
has finished restoring the picker owner window after
IFileDialog::Showreturns.
Changes
window timer
subscription, layout, and daemon registration state
one completion, cancel is inert, repeated accept is safe, and timer IDs do
not collide
Test plan
RED: zig test src\App.zig src\AccessibilityProvider.cpp src\FilePicker.c .graphcode-tools\providers\winghostty\zig-out\lib\winghostty-win32-host.lib -target x86_64-windows-msvc --test-filter "folder picker completion waits for native callback unwind" -> expected 0 posted completions, found 1
GREEN: zig test src\App.zig src\AccessibilityProvider.cpp src\FilePicker.c .graphcode-tools\providers\winghostty\zig-out\lib\winghostty-win32-host.lib -target x86_64-windows-msvc --test-filter "folder picker completion waits for native callback unwind" -> 1/1 passed
REGRESSION: pwsh -NoProfile -File Tools\windows\validate.ps1 -Task windows-shell -SkipTrayLive -ShellValidationRoot C:\v5 -SwiftExecutable $env:GRAPHCODE_SWIFT633 -> exit 0; 52/52 sections, App 736/736, Worktree process 21/21, shell smoke, daemon handoff, tray contracts, and full UIA passed
Checklist
git commit -s) per the DCOmake test)make check)The Dev Box reproduced the pre-fix production crash after native Ctrl+O and
Select Folder: daemon registration succeeded once, then the shell terminated
with USER32
0xc0000005/ callback escape0xc000041d. This Windows host couldnot deliver the attended picker-opening accelerator or menu input reliably, so
the post-fix native accept path remains
NotExecutedlocally and must be rerunon the Dev Box. No dump was collected or required for this source-level fix.