Thanks André, Andrew, Esme,
It sounds like at least I'm on the right track, but I guess any change would need to be controlled on a per-app basis.
Is it typical to use a cmdline flag or an environment variable for something like this? E.g
wine --file-dialog=xdg-desktop-portal notepad2.exe
or
WINEFILEDIALOG=xdg-desktop-portal wine notepad2.exe
I'm guessing that WINEDLLOVERRIDES could be used if I fork the code and produce my own version of comdlg32.dll, but I prefer not to maintain any fork.
Does anyone have a feeling on whether wine would be happy to add an extra option such as WINEFILEDIALOG? I suppose if I get some patches done, I can post them up and we can have further discussion.
For apps that want to customize the UI with a custom hook, I would either have them fallback to the current UI, or ignore their requests for custom hooks. It may still be a better experience to use native FilesApp even without the customizations.