From 71ca32a56001605a37d0d4b52e38c19df2c7f00b Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 18 Jul 2024 03:09:46 -0400 Subject: [PATCH] cleanup(wayland/compositor) --- src/wayland/compositor.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wayland/compositor.rs b/src/wayland/compositor.rs index b08b097..adebfa6 100644 --- a/src/wayland/compositor.rs +++ b/src/wayland/compositor.rs @@ -18,10 +18,10 @@ impl CompositorHandler for WaylandState { fn commit(&mut self, surface: &WlSurface) { debug!(?surface, "Surface commit"); - // Let smithay handle buffer management (has to be done here as RendererSurfaceStates is not thread safe) - on_commit_buffer_handler::(&surface); + + on_commit_buffer_handler::(surface); let mut count = 0; - let core_surface = compositor::with_states(surface, |data| { + compositor::with_states(surface, |data| { let count_new = data .data_map .insert_if_missing_threadsafe(|| AtomicU32::new(0)); @@ -33,7 +33,7 @@ impl CompositorHandler for WaylandState { data.data_map.get::>().cloned() }); - if let Some(core_surface) = core_surface { + if let Some(core_surface) = CoreSurface::from_wl_surface(surface) { core_surface.commit(count); } }