From c8a60c4513edbe588d982cfdc991c245166bb34a Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 16 Aug 2023 09:59:27 +0400 Subject: Use the correct min_size state --- src/layout.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/layout.rs b/src/layout.rs index 4c986b88..eb0cfef6 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -46,7 +46,7 @@ use smithay::reexports::wayland_protocols::xdg::shell::server::xdg_toplevel; use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface; use smithay::utils::{Logical, Point, Rectangle, Scale, Size}; use smithay::wayland::compositor::{with_states, SurfaceData}; -use smithay::wayland::shell::xdg::XdgToplevelSurfaceData; +use smithay::wayland::shell::xdg::SurfaceCachedState; use crate::animation::Animation; @@ -191,13 +191,8 @@ impl LayoutElement for Window { fn min_size(&self) -> Size { with_states(self.toplevel().wl_surface(), |state| { - state - .data_map - .get::() - .unwrap() - .lock() - .unwrap() - .min_size + let curr = state.cached_state.current::(); + curr.min_size }) } -- cgit