How can I stop bevy_egui from sending RequestRedraw whenever I move the mouse?
Hello ! π
bevy_egui is sending a RequestRedraw event to Bevy in the process_output_system, here:
https://github.com/mvlabat/bevy_egui/blob/6021f22a0e69ed802844a259d4b43d94007027ec/src/systems.rs#L535-L537
... when any of the EGUI contexts need a repaint
I'm using egui only for debugging purposes (a debug Window, similar to the bevy_inspector_egui) but I have a problem: even when my EGUI window is not opened at all (so, I'm not even running the systems to draw it), the EGUI systems run and send the RequestRedraw event
This is a problem for me because I want to control the frame rate, and I do not want to run a new frame, even if I receive an input event from a device or the window
Repro steps are fairly easy: in the simple.rs example of this repo, comment out the system. It will only show a black screen, but if you put a println! log in the piece of code sending the RequestRedraw event linked above, it will be called whenever the cursor moves on top of the screen
How can I disable this behaviour from my app? I'm trying to remove the EGUI Context from the PrimaryWindow, but there is an unwrap inside of bevy_egui that is expecting it, so it panics.
Since I think this cannot be done from outside of bevy_winit, I'm trying to modify the source code to run this system only when there is anything actually being painted, but I'm still digging through the code to learn how I can do it, so any advice is welcome π