autocommit 2022-05-01 21:44:09 CEST
This commit is contained in:
parent
cca3850800
commit
04580c4aeb
38 changed files with 815 additions and 124 deletions
16
src/state.rs
16
src/state.rs
|
|
@ -6,6 +6,7 @@ use {
|
|||
Backend, BackendEvent, Connector, ConnectorId, ConnectorIds, InputDevice,
|
||||
InputDeviceId, InputDeviceIds, MonitorInfo,
|
||||
},
|
||||
backends::dummy::DummyBackend,
|
||||
cli::RunArgs,
|
||||
client::{Client, Clients, SerialRange, NUM_CACHED_SERIAL_RANGES},
|
||||
config::ConfigProxy,
|
||||
|
|
@ -43,7 +44,9 @@ use {
|
|||
std::{
|
||||
cell::{Cell, RefCell},
|
||||
fmt::{Debug, Formatter},
|
||||
mem,
|
||||
num::Wrapping,
|
||||
ops::DerefMut,
|
||||
rc::Rc,
|
||||
sync::Arc,
|
||||
time::Duration,
|
||||
|
|
@ -397,4 +400,17 @@ impl State {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn clear(&self) {
|
||||
self.xwayland.handler.borrow_mut().take();
|
||||
self.clients.clear();
|
||||
self.config.set(None);
|
||||
self.backend.set(Rc::new(DummyBackend));
|
||||
{
|
||||
let seats = mem::take(self.globals.seats.lock().deref_mut());
|
||||
for seat in seats.values() {
|
||||
seat.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue