Using native Chrome OS FilesApp for file chooser

André Hentschel nerv at dawncrow.de
Mon May 17 07:48:48 CDT 2021


Hi Joel,

Am 17.05.21 um 12:22 schrieb Joel Hockey:
> I'm one of the Chrome OS developers. I would like to make it possible for wine apps running in the crostini linux VM to use the Chrome OS native FilesApp for file chooser when possible.  Using the native FilesApp improves the UX consistency, and also allows us to let VM apps get access to files outside the VM which can be shared on-demand when a user selects.
> 
> Does wine already have any APIs where a native file chooser dialog can be configured either during compile or at runtime?  I don't see anything.

AFAICT no

> 
> I've been looking at the possibilities today, and doing some testing using Notepad2.exe (since it is the simplest windows app I know).  I see that it calls GetOpenFilenameW() to launch a file chooser which is implemented in dlls/comdlg32/filedlg.c GetFileDialog95().  Do most (all) apps use this same API for a file chooser?

I would think so yes

> 
> Would GetFileDialog95() be a possible place to call out to a native file chooser?  I'm not familiar with this space, but I've discovered today that xdg-desktop-portal dbus APIs (org.freedesktop.portal.FileChooser) could be a suitable approach.
> https://github.com/flatpak/xdg-desktop-portal <https://github.com/flatpak/xdg-desktop-portal>

One issue you will face here is that some applications want to modify the "file open/save window". IIRC adding special buttons and so on.

> 
> I'm planning to look at this a little more and try and get some code running soon. I can send some patches then, but any help now to point me in a good direction is appreciated.
> 
> Thanks
> Joel




More information about the wine-devel mailing list