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

iOS: fix request_redraw from RedrawRequested #3378

Conversation

daxpedda
Copy link
Member

@daxpedda daxpedda commented Jan 9, 2024

This fixes calling Window::request_redraw() from WindowEvent:RedrawRequested causing panics.
Instead it is queued for the next event loop, which is awoken instantly as currently iOS doesn't support #2412.

@daxpedda daxpedda added this to the Version 0.29.10 milestone Jan 9, 2024
@daxpedda daxpedda requested a review from madsmtm as a code owner January 9, 2024 14:46
Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I tried to reproduce the issue, and I don't seem to be able to?

But in any case, this does look more correct.

@daxpedda
Copy link
Member Author

Does it actually cause a RedrawRequested event? Because a user on Matrix shared some screenshots where it didn't show up.
(I will also still have to remove the warning)

@madsmtm
Copy link
Member

madsmtm commented Jan 13, 2024

Hmm, nope, it doesn't (tested with wgpu, it probably does if you use other rendering backends).

@daxpedda daxpedda removed this from the Version 0.29.10 milestone Jan 14, 2024
@mockersf
Copy link
Contributor

With Bevy (so wgpu too), this doesn't fix calling request_redraw from a RedrawRequested event. It doesn't panic, it just does nothing

@daxpedda
Copy link
Member Author

daxpedda commented Jan 17, 2024

With Bevy (so wgpu too), this doesn't fix calling request_redraw from a RedrawRequested event. It doesn't panic, it just does nothing

Thank you for testing it!
I guess I'm gonna go ahead and close this as I can't really fix/develop it without a device.

I left an issue at #3406.

@daxpedda daxpedda closed this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants