1
0
Fork 0
forked from wry/wry

Add retained spawn-out animations

This commit is contained in:
atagen 2026-05-21 17:09:06 +10:00
parent d0cc5dc3c7
commit fa5c28ca3d
9 changed files with 331 additions and 8 deletions

View file

@ -260,6 +260,7 @@ impl XdgToplevelRequestHandler for XdgToplevel {
type Error = XdgToplevelError;
fn destroy(&self, _req: Destroy, _slf: &Rc<Self>) -> Result<(), Self::Error> {
self.queue_spawn_out();
self.tl_destroy();
self.xdg.unset_ext();
{
@ -399,6 +400,11 @@ impl XdgToplevelRequestHandler for XdgToplevel {
}
impl XdgToplevel {
fn queue_spawn_out(&self) {
self.toplevel_data
.queue_spawn_out(self, self.tl_animation_snapshot());
}
fn map(
self: &Rc<Self>,
parent: Option<&XdgToplevel>,
@ -824,6 +830,10 @@ impl XdgSurfaceExt for XdgToplevel {
self.after_commit(None);
}
fn prepare_unmap(&self) {
self.queue_spawn_out();
}
fn extents_changed(&self) {
self.toplevel_data.pos.set(self.xdg.extents.get());
self.tl_extents_changed();