chore: Update smithay for thread-safety

This commit is contained in:
Victoria Brekenfeld 2024-06-07 18:58:33 +02:00 committed by Victoria Brekenfeld
parent 0f6622d8ee
commit e78e199663
19 changed files with 54 additions and 94 deletions

View file

@ -407,7 +407,11 @@ impl CosmicSurface {
match self.0.underlying_surface() {
WindowSurface::Wayland(toplevel) => {
Some(with_states(toplevel.wl_surface(), |states| {
states.cached_state.current::<SurfaceCachedState>().min_size
states
.cached_state
.get::<SurfaceCachedState>()
.current()
.min_size
}))
.filter(|size| !(size.w == 0 && size.h == 0))
}
@ -426,7 +430,11 @@ impl CosmicSurface {
match self.0.underlying_surface() {
WindowSurface::Wayland(toplevel) => {
Some(with_states(toplevel.wl_surface(), |states| {
states.cached_state.current::<SurfaceCachedState>().max_size
states
.cached_state
.get::<SurfaceCachedState>()
.current()
.max_size
}))
.filter(|size| !(size.w == 0 && size.h == 0))
}