Draft: comdlg32: Use XDG Desktop Portal for native file dialogs

This adds XDG desktop portal integration for Wine file dialogs, with compatibility fallbacks, and solves https://bugs.winehq.org/show_bug.cgi?id=51134

I used an LLM to create the patches, the wiki does not contain an LLM policy, so I don't know if this is eligible to be merged at all.

I used the following sources:

Implementation:

  • Add a portal backend in comdlg32 for file open/save requests
  • Add portal handling for GetOpenFileNameW, GetOpenFileNameA, GetSaveFileNameW, and GetSaveFileNameA when requests are compatible with portal features
  • Route compatible IFileDialog/IFileOpenDialog/IFileSaveDialog paths through the portal
  • Keep native Wine dialogs in case of unsupported/customized dialog options
  • Add a combobox to winecfg to select the policy for XDG Desktop Portal file dialogs: auto / always / never

image

image

image

Merge request reports

Loading