-
Notifications
You must be signed in to change notification settings - Fork 73
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
Spawning an AsyncMessageDialog
in response to a winit WindowEvent::DroppedFile event does not work properly
#6
Comments
First, I haven't checked if So... I don't see any solution for this yet, the only solution I have in mind now is adding But this sounds more like yet another workaround rather than a fix... |
That might be interesting as an alternative to winit, if you happen to take a look let me know the results.
I can agree. The entire idea that we cannot run sync dialogs on OsX on Winit feels like something that should be fixed in Winit itself. |
Speaking of sync dialogs... every occasion is a good occasion to bump rust-windowing/winit#1779 XDD Jokes aside, I will try to research this one more, (my hope is that it is not winit related) and If I figure something out I'll let you know. |
So... it's not winit related, I acually like the way winit handles this a lot more than SDL2 (don't want to go to deep in to details) The problem is purely related to the use of
|
So, if I understand this correctly, this issue would happen every time we
open any dialog while the window is in the background, or minimized (e.g:
when opening a dialog on a timer), right?
This sounds like a big thorn in the side for any user that might need to do
anything out of the ordinary.
Perhaps this really needs attention from winit devs, since workarounds are
getting ugly really quickly.
|
Just to be clear all the async shenanigans has nothing to do with winit, it's entirely my responsibility to make this work, but the question is, would rfd ever need async support if winit sync dialogs were not fundamentally broken... probably not. So with that out of the way (once again it's not winit related), my plan is to...
|
So, I introduced 2 fixes for this:
Both are available on The quickest way would probably be by playing around with |
I have tested this on my three machines, one Linux, one W10, one MacOS, and I can confirm that the |
Thanks, I will publish a new version shortly |
before you do, there is one other save-file related thing I am working on windows, I will post an issue and a pull request within a couple hours at most |
Sure, thanks for a notice |
I don't know if this is a rfd or a winit bug, but if you drop a file onto a winit window on MacOS and try to show a dialog as a response, the
AsyncMessageDialog
does not work. Instead, the "Hi! It looks like you are running async dialog in unsuported environment, I will fallback to sync dialog for you." gets printed. I think this is because theapp.key_window()
at line 58 ofmodal_future.rs
is actually null.It is easy to reproduce this by making a small change to the winit example, see my branch: https://github.com/francesco-cattoglio/rfd/tree/dropped_file_bug
To reproduce, just start the example and drag any file from the MacOS Finder onto the window.
The text was updated successfully, but these errors were encountered: