Fix performance regression from endless present loop
This commit is contained in:
@@ -1938,11 +1938,10 @@ impl Dispatch<wl_callback::WlCallback, ()> for State {
|
|||||||
_conn: &Connection,
|
_conn: &Connection,
|
||||||
_qh: &QueueHandle<Self>,
|
_qh: &QueueHandle<Self>,
|
||||||
) {
|
) {
|
||||||
if let wl_callback::Event::Done { .. } = event {
|
if let wl_callback::Event::Done { .. } = event
|
||||||
if state.frame_callback.as_ref() == Some(callback) {
|
&& state.frame_callback.as_ref() == Some(callback)
|
||||||
state.frame_callback = None;
|
{
|
||||||
}
|
state.frame_callback = None;
|
||||||
state.request_redraw();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user