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

Request Redraw only if really needed. Fixes #277 #278

Merged
merged 2 commits into from
Jun 2, 2024

Conversation

Maximetinu
Copy link
Contributor

@Maximetinu Maximetinu commented Apr 23, 2024

Hello,

I had this problem that I described at this issue:

where it is a blocker for my use case that bevy_egui sends RequestRedraw events, even when I'm not painting any EGUI window.

So, this PR fixes the process_output_system so that it doesn't emit that event when nothing is being painted.

It will keep working as usual when EGUI is painting.


On another note:

I'm not sure that RequestRedraw is really needed. If the UpdateMode of the Bevy's WinitSettings resource is UpdateMode::Continuous, Bevy will redraw anyway. If it is UpdateMode::Reactive or UpdateMode::ReactiveLowPower, both of them should answer to Window events, like moving the cursor (see here in bevy_winit)

However, I'm not removing it in this PR to be cautious and not reintroduce previous bugs like

@vladbat00
Copy link
Owner

Hi, thank you for the PR! Lgtm, apologies for taking that long to review it

@vladbat00 vladbat00 merged commit 4a4ba67 into vladbat00:main Jun 2, 2024
39 checks passed
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

Successfully merging this pull request may close these issues.

2 participants