fix(wayland): flush clients after sending frame events for max fps
This commit is contained in:
@@ -169,10 +169,6 @@ impl WaylandState {
|
|||||||
.insert_client(client, Arc::new(ClientState));
|
.insert_client(client, Arc::new(ClientState));
|
||||||
}
|
}
|
||||||
display.dispatch_clients(self).unwrap();
|
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() {
|
while let Ok(global_to_destroy) = self.global_destroy_queue.try_recv() {
|
||||||
self.display_handle
|
self.display_handle
|
||||||
@@ -193,6 +189,7 @@ impl WaylandState {
|
|||||||
send_frames_surface_tree(surf.wl_surface(), time_ms);
|
send_frames_surface_tree(surf.wl_surface(), time_ms);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
display.flush_clients().unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl Drop for WaylandState {
|
impl Drop for WaylandState {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ use std::{
|
|||||||
sync::{Arc, Weak},
|
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! {
|
lazy_static! {
|
||||||
static ref ITEM_TYPE_INFO_PANEL: TypeInfo = TypeInfo {
|
static ref ITEM_TYPE_INFO_PANEL: TypeInfo = TypeInfo {
|
||||||
|
|||||||
Reference in New Issue
Block a user