aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-08-16 09:59:27 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-08-16 09:59:27 +0400
commitc8a60c4513edbe588d982cfdc991c245166bb34a (patch)
tree5e5701ba6f0bb5438bf7f0da654320b9ab38edd7 /src
parent9d6be649551990205dcf7f4a0343078940ed1e05 (diff)
downloadniri-c8a60c4513edbe588d982cfdc991c245166bb34a.tar.gz
niri-c8a60c4513edbe588d982cfdc991c245166bb34a.tar.bz2
niri-c8a60c4513edbe588d982cfdc991c245166bb34a.zip
Use the correct min_size state
Diffstat (limited to 'src')
-rw-r--r--src/layout.rs11
1 files changed, 3 insertions, 8 deletions
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<i32, Logical> {
with_states(self.toplevel().wl_surface(), |state| {
- state
- .data_map
- .get::<XdgToplevelSurfaceData>()
- .unwrap()
- .lock()
- .unwrap()
- .min_size
+ let curr = state.cached_state.current::<SurfaceCachedState>();
+ curr.min_size
})
}