fix(wayland): flush clients after sending frame events for max fps

This commit is contained in:
Nova
2022-09-03 07:07:00 -04:00
parent 5c91a432f5
commit 98d5b4b5d6
2 changed files with 2 additions and 5 deletions

View File

@@ -169,10 +169,6 @@ impl WaylandState {
.insert_client(client, Arc::new(ClientState));
}
display.dispatch_clients(self).unwrap();
display.flush_clients().unwrap();
drop(display);
drop(display_clone);
while let Ok(global_to_destroy) = self.global_destroy_queue.try_recv() {
self.display_handle
@@ -193,6 +189,7 @@ impl WaylandState {
send_frames_surface_tree(surf.wl_surface(), time_ms);
}
});
display.flush_clients().unwrap();
}
}
impl Drop for WaylandState {

View File

@@ -34,7 +34,7 @@ use std::{
sync::{Arc, Weak},
};
use super::{seat::SeatData, surface::CoreSurface, WaylandState, GLOBAL_DESTROY_QUEUE_IN};
use super::{seat::SeatData, surface::CoreSurface, GLOBAL_DESTROY_QUEUE_IN};
lazy_static! {
static ref ITEM_TYPE_INFO_PANEL: TypeInfo = TypeInfo {