Free proxy slots unconditionally in AboutToWait

This commit is contained in:
Héctor Ramón Jiménez 2025-02-26 13:27:30 +01:00
parent 34314b3f57
commit cf2b28fd74
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -989,6 +989,11 @@ async fn run_instance<P, C>(
} }
} }
event::Event::AboutToWait => { event::Event::AboutToWait => {
if actions > 0 {
proxy.free_slots(actions);
actions = 0;
}
if events.is_empty() if events.is_empty()
&& messages.is_empty() && messages.is_empty()
&& window_manager.is_idle() && window_manager.is_idle()
@ -1105,11 +1110,6 @@ async fn run_instance<P, C>(
&mut window_manager, &mut window_manager,
cached_interfaces, cached_interfaces,
)); ));
if actions > 0 {
proxy.free_slots(actions);
actions = 0;
}
} }
if let Some(redraw_at) = window_manager.redraw_at() { if let Some(redraw_at) = window_manager.redraw_at() {