Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't pop file dialog #69

Open
9cxndy opened this issue Nov 15, 2020 · 6 comments
Open

Can't pop file dialog #69

9cxndy opened this issue Nov 15, 2020 · 6 comments

Comments

@9cxndy
Copy link

9cxndy commented Nov 15, 2020

Because of mono/mono#20578, application running on wine-mono can't open a file dialog.

Maybe it makes sense to just bypass that check in WPF?

@madewokherd
Copy link
Owner

Based on MSDN it seems UserInteractive is supposed to tell you if you're in a service process. Mono has code for service processes, so it may not be difficult to implement it properly.

Failing that, I don't think the stub should return false, as 99% of the time it won't be in a service process.

@nsivov
Copy link
Contributor

nsivov commented Nov 15, 2020

It is implemented in dotnet/runtime at https://github.com/dotnet/runtime/blob/2544c744d204c6ae0e20ba78c9cb8832a92091f3/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs#L145. I don't know if it's worth duplicating in wine-mono, maybe flipping return value is enough.

@madewokherd
Copy link
Owner

We'd need a platform check, but I think it'd be fine to use that.

@madewokherd
Copy link
Owner

I tried changing the return value, and it still doesn't seem to work. I get some IFileDialog2_fnQueryInterface fixmes and the program stops with no window appearing.

@madewokherd
Copy link
Owner

It does call IFileDialog2::Show, but the dialog doesn't actually show up for some reason.

@9cxndy
Copy link
Author

9cxndy commented Nov 16, 2020

If I just remove the UserInteractive test, the dialog shows up for me. I was using Proton 5.13, don't know if they have any secret sauce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants