Update smithay

Updates for `last_acked`, etc. API changes in
https://github.com/Smithay/smithay/pull/1817.

Includes layer shell fixes
from https://github.com/Smithay/smithay/pull/1819.
This commit is contained in:
Ian Douglas Scott 2025-10-09 18:18:29 -07:00 committed by Victoria Brekenfeld
parent 9816b18259
commit e129094bfb
4 changed files with 45 additions and 40 deletions

View file

@ -15,7 +15,9 @@ use smithay::{
wayland::{
compositor::{get_role, with_states},
seat::WaylandFocus,
shell::xdg::{PopupSurface, ToplevelSurface, XDG_POPUP_ROLE, XdgPopupSurfaceData},
shell::xdg::{
PopupCachedState, PopupSurface, ToplevelSurface, XDG_POPUP_ROLE, XdgPopupSurfaceData,
},
},
};
use tracing::warn;
@ -87,14 +89,12 @@ pub fn update_reactive_popups<'a>(
for (popup, _) in PopupManager::popups_for_surface(toplevel.wl_surface()) {
match popup {
PopupKind::Xdg(surface) => {
let positioner = with_states(surface.wl_surface(), |states| {
let attributes = states
.data_map
.get::<XdgPopupSurfaceData>()
.unwrap()
.lock()
.unwrap();
attributes.current.positioner
let positioner = with_states(&surface.wl_surface(), |states| {
let mut guard = states.cached_state.get::<PopupCachedState>();
guard
.current()
.last_acked
.map_or_else(Default::default, |configure| configure.state.positioner)
});
if positioner.reactive {
let anchor_point = loc + positioner.get_anchor_point().as_global();