1
0
Fork 0
forked from wry/wry

wayland: don't store direct output references

This commit is contained in:
Julian Orth 2024-04-25 19:38:19 +02:00
parent 0605438d56
commit 4651f760f0
13 changed files with 123 additions and 65 deletions

View file

@ -57,20 +57,20 @@ impl ExtSessionLockV1RequestHandler for ExtSessionLockV1 {
surface,
tracker: Default::default(),
serial: Default::default(),
output: output.global.node.get(),
output: output.global.clone(),
seat_state: Default::default(),
version: self.version,
});
track!(new.client, new);
new.install()?;
self.client.add_client_obj(&new)?;
if !output.global.destroyed.get() && !self.finished.get() {
if let Some(node) = output.global.node.get() {
if !self.finished.get() {
if let Some(node) = output.global.node() {
if node.lock_surface.is_some() {
return Err(ExtSessionLockV1Error::OutputAlreadyLocked);
}
node.set_lock_surface(Some(new.clone()));
let pos = output.global.pos.get();
let pos = node.global.pos.get();
new.change_extents(pos);
self.client.state.tree_changed();
}