Fix performance regression from endless present loop
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user