1
0
Fork 0
forked from wry/wry

tree: map toplevel identifiers to toplevels

This commit is contained in:
Julian Orth 2024-10-10 12:43:43 +02:00
parent 43bb787d52
commit e6c3c9c1ed
9 changed files with 57 additions and 27 deletions

View file

@ -347,7 +347,7 @@ impl XdgSurfaceRequestHandler for XdgSurface {
);
return Err(XdgSurfaceError::AlreadyConstructed);
}
let toplevel = Rc::new(XdgToplevel::new(req.id, slf));
let toplevel = Rc::new_cyclic(|weak| XdgToplevel::new(req.id, slf, weak));
track!(self.surface.client, toplevel);
self.surface.client.add_client_obj(&toplevel)?;
self.ext.set(Some(toplevel.clone()));