fix(wayland): account for surface data map panic

This commit is contained in:
Nova
2022-11-09 11:02:48 -05:00
parent e2b00f23ee
commit 6b578fe044
4 changed files with 22 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
use super::{state::WaylandState, surface::CoreSurface};
use smithay::{
backend::renderer::utils::on_commit_buffer_handler,
delegate_compositor,
reexports::wayland_server::protocol::wl_surface::WlSurface,
wayland::compositor::{self, CompositorHandler, CompositorState},
@@ -11,6 +12,7 @@ impl CompositorHandler for WaylandState {
}
fn commit(&mut self, surface: &WlSurface) {
on_commit_buffer_handler(surface);
compositor::with_states(surface, |data| {
data.data_map.insert_if_missing_threadsafe(|| {
CoreSurface::new(