session-lock: move unlock logic to single place
This commit is contained in:
parent
5a53b74265
commit
44bdca8235
3 changed files with 16 additions and 20 deletions
|
|
@ -87,16 +87,7 @@ impl ExtSessionLockV1RequestHandler for ExtSessionLockV1 {
|
|||
return Err(ExtSessionLockV1Error::NeverLocked);
|
||||
}
|
||||
if !self.finished.get() {
|
||||
let state = &self.client.state;
|
||||
state.lock.locked.set(false);
|
||||
state.lock.lock.take();
|
||||
for output in state.root.outputs.lock().values() {
|
||||
if let Some(surface) = output.set_lock_surface(None) {
|
||||
surface.destroy_node();
|
||||
}
|
||||
}
|
||||
state.tree_changed();
|
||||
state.damage();
|
||||
self.client.state.do_unlock();
|
||||
}
|
||||
self.client.remove_obj(self)?;
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue