summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-26 13:27:30 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-26 13:28:03 +0100
commitcf2b28fd7458173162888778782ad3fa60f9c651 (patch)
treefc12b0b0a0e8b465265d4ccf4944ac043dceddea
parent34314b3f576fdfffdd82968a685020d4dca47992 (diff)
downloadiced-cf2b28fd7458173162888778782ad3fa60f9c651.tar.gz
iced-cf2b28fd7458173162888778782ad3fa60f9c651.tar.bz2
iced-cf2b28fd7458173162888778782ad3fa60f9c651.zip
Free proxy slots unconditionally in `AboutToWait`
-rw-r--r--winit/src/program.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/winit/src/program.rs b/winit/src/program.rs
index c57c0b1b..a1b8b579 100644
--- a/winit/src/program.rs
+++ b/winit/src/program.rs
@@ -989,6 +989,11 @@ async fn run_instance<P, C>(
}
}
event::Event::AboutToWait => {
+ if actions > 0 {
+ proxy.free_slots(actions);
+ actions = 0;
+ }
+
if events.is_empty()
&& messages.is_empty()
&& window_manager.is_idle()
@@ -1105,11 +1110,6 @@ async fn run_instance<P, C>(
&mut window_manager,
cached_interfaces,
));
-
- if actions > 0 {
- proxy.free_slots(actions);
- actions = 0;
- }
}
if let Some(redraw_at) = window_manager.redraw_at() {