forge
Explore
Log in

Don't you dare go Hollow

Use the correct min_size state

Browse files at this commit

c8a60c4513edbe588d982cfdc991c245166bb34aIvan MolodetskikhParent: 9d6be64
src/layout.rsmodified+3 -8
@@ -46,7 +46,7 @@ use smithay::reexports::wayland_protocols::xdg::shell::server::xdg_toplevel;
46 use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;46 use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;
47 use smithay::utils::{Logical, Point, Rectangle, Scale, Size};47 use smithay::utils::{Logical, Point, Rectangle, Scale, Size};
48 use smithay::wayland::compositor::{with_states, SurfaceData};48 use smithay::wayland::compositor::{with_states, SurfaceData};
49-use smithay::wayland::shell::xdg::XdgToplevelSurfaceData;49+use smithay::wayland::shell::xdg::SurfaceCachedState;
50 50
51 use crate::animation::Animation;51 use crate::animation::Animation;
52 52
@@ -191,13 +191,8 @@ impl LayoutElement for Window {
191 191
192 fn min_size(&self) -> Size<i32, Logical> {192 fn min_size(&self) -> Size<i32, Logical> {
193 with_states(self.toplevel().wl_surface(), |state| {193 with_states(self.toplevel().wl_surface(), |state| {
194- state194+ let curr = state.cached_state.current::<SurfaceCachedState>();
195- .data_map195+ curr.min_size
196- .get::<XdgToplevelSurfaceData>()
197- .unwrap()
198- .lock()
199- .unwrap()
200- .min_size
201 })196 })
202 }197 }
203 198