Skip to content

Display the wsl node in FolderPicker and FileSavePicker dialog navigation#6326

Open
DinahK-2SO wants to merge 5 commits intomainfrom
user/DinahK-2SO/display_wsl_node_in_filedialog_navigation
Open

Display the wsl node in FolderPicker and FileSavePicker dialog navigation#6326
DinahK-2SO wants to merge 5 commits intomainfrom
user/DinahK-2SO/display_wsl_node_in_filedialog_navigation

Conversation

@DinahK-2SO
Copy link
Copy Markdown
Contributor

@DinahK-2SO DinahK-2SO commented Mar 23, 2026

Problem

The WSL navigation node (\\wsl.localhost) is hidden in the navigation pane of FolderPicker and FileSavePicker dialogs due to undocumented behavior in the Windows Common Item Dialog. FileOpenPicker is unaffected.

Fix

PickerCommon::WslNodeRevealer - a per-dialog IFileDialogEvents handler - is registered before Show(). On the first OnFolderChange it:

  1. Walks IServiceProvider -> SID_STopLevelBrowser -> IShellBrowser -> INameSpaceTreeControl.
  2. Resolves the WSL root shell item (\\wsl.localhost, falling back to \\wsl$).
  3. Polls (10 ms, up to 1 s) for navigation-pane root nodes to load; when the WSL node is found among their children, calls INameSpaceTreeControl::SetItemState to reveal it.

Changes

  • PickerCommon.h / PickerCommon.cpp — Added WslNodeRevealer with per-instance state. PollTimerProc is static (required by TIMERPROC); all other methods are non-static.
  • FileSavePicker.cpp — Register WslNodeRevealer in PickSaveFileAsync.
  • FolderPicker.cpp — Register WslNodeRevealer in PickSingleFolderAsync and PickMultipleFoldersAsync.

After Fix

  • FolderPicker:
    after-fix-folderpicker
  • FileSavePicker:
    after-fix-savepicker

Before Fix

  • FolderPicker:
    before-fix-folderpicker
  • FileSavePicker:
    before-fix-savepicker

@DinahK-2SO DinahK-2SO changed the title Display the wsl node. Display the wsl node in FolderPicker and FileSavePicker dialog navigation Mar 23, 2026
@DinahK-2SO DinahK-2SO marked this pull request as draft March 23, 2026 05:46
@DinahK-2SO DinahK-2SO marked this pull request as ready for review March 25, 2026 18:02
@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants