Request a redraw only on relevant events
This commit is contained in:
parent
c0a5dc980e
commit
49dbf2c146
4 changed files with 27 additions and 13 deletions
|
|
@ -150,6 +150,10 @@ pub fn run<A, E, C>(
|
|||
|
||||
event_loop.run(move |event, _, control_flow| match event {
|
||||
event::Event::MainEventsCleared => {
|
||||
if state.is_queue_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
let command = runtime.enter(|| {
|
||||
state.update(
|
||||
clipboard.as_ref().map(|c| c as _),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue