Fix performance regression from endless present loop

This commit is contained in:
2026-03-21 14:59:42 -04:00
parent ac9be932e7
commit d4ff472a14

View File

@@ -1938,12 +1938,11 @@ impl Dispatch<wl_callback::WlCallback, ()> for State {
_conn: &Connection,
_qh: &QueueHandle<Self>,
) {
if let wl_callback::Event::Done { .. } = event {
if state.frame_callback.as_ref() == Some(callback) {
if let wl_callback::Event::Done { .. } = event
&& state.frame_callback.as_ref() == Some(callback)
{
state.frame_callback = None;
}
state.request_redraw();
}
}
}