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

@ -1,7 +1,7 @@
use {
crate::{
ifs::wl_surface::{
SurfaceExt, WlSurface, WlSurfaceError,
PendingState, SurfaceExt, WlSurface, WlSurfaceError,
x_surface::{xwayland_surface_v1::XwaylandSurfaceV1, xwindow::Xwindow},
},
leaks::Tracker,
@ -30,6 +30,22 @@ impl SurfaceExt for XSurface {
win.node_layer()
}
fn before_apply_commit(
self: Rc<Self>,
pending: &mut PendingState,
) -> Result<(), WlSurfaceError> {
if pending
.buffer
.as_ref()
.is_some_and(|buffer| buffer.is_none())
&& self.surface.buffer.is_some()
&& let Some(xwindow) = self.xwindow.get()
{
xwindow.queue_spawn_out();
}
Ok(())
}
fn after_apply_commit(self: Rc<Self>) {
if let Some(xwindow) = self.xwindow.get() {
xwindow.map_status_changed();
@ -45,6 +61,7 @@ impl SurfaceExt for XSurface {
}
self.surface.unset_ext();
if let Some(xwindow) = self.xwindow.take() {
xwindow.queue_spawn_out();
xwindow.tl_destroy();
xwindow.data.window.set(None);
xwindow.data.surface_id.set(None);