aboutsummaryrefslogtreecommitdiff
path: root/src/handlers/compositor.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-09-05 16:41:54 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-09-17 22:04:23 +0300
commit4808ba2b2055a09008be17d3e9eeae2d592b7b18 (patch)
tree2ca186112158a9b69e36aa6f76cd78f0361fc911 /src/handlers/compositor.rs
parent35cbab476ebfc271909777029f56f666b29d76a2 (diff)
downloadniri-4808ba2b2055a09008be17d3e9eeae2d592b7b18.tar.gz
niri-4808ba2b2055a09008be17d3e9eeae2d592b7b18.tar.bz2
niri-4808ba2b2055a09008be17d3e9eeae2d592b7b18.zip
Update Smithay (last_acked refactor, Qt layer-shell popup grab fix, popup ordering fix)
Diffstat (limited to 'src/handlers/compositor.rs')
-rw-r--r--src/handlers/compositor.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/handlers/compositor.rs b/src/handlers/compositor.rs
index 034ee0d0..cf2efaaf 100644
--- a/src/handlers/compositor.rs
+++ b/src/handlers/compositor.rs
@@ -14,7 +14,7 @@ use smithay::wayland::compositor::{
SurfaceAttributes,
};
use smithay::wayland::dmabuf::get_dmabuf;
-use smithay::wayland::shell::xdg::XdgToplevelSurfaceData;
+use smithay::wayland::shell::xdg::ToplevelCachedState;
use smithay::wayland::shm::{ShmHandler, ShmState};
use smithay::{delegate_compositor, delegate_shm};
@@ -286,13 +286,14 @@ impl CompositorHandler for State {
.buffer_delta
.take();
- let role = states
- .data_map
- .get::<XdgToplevelSurfaceData>()
- .unwrap()
- .lock()
- .unwrap();
- (role.configure_serial, buffer_delta)
+ let serial = states
+ .cached_state
+ .get::<ToplevelCachedState>()
+ .current()
+ .last_acked
+ .as_ref()
+ .map(|c| c.serial);
+ (serial, buffer_delta)
});
if serial.is_none() {
error!("commit on a mapped surface without a configured serial");