state: Move shell behind RwLock

This commit is contained in:
Victoria Brekenfeld 2024-04-10 15:49:08 +02:00 committed by Victoria Brekenfeld
parent 647deb81f1
commit 5d5a510691
45 changed files with 2657 additions and 2097 deletions

View file

@ -45,17 +45,26 @@ pub fn init_backend_auto(
let output = state
.common
.shell
.read()
.unwrap()
.outputs()
.next()
.with_context(|| "Backend initialized without output")?;
.with_context(|| "Backend initialized without output")
.cloned()?;
let initial_seat = crate::shell::create_seat(
dh,
&mut state.common.seat_state,
output,
&output,
&state.common.config,
"seat-0".into(),
);
state.common.shell.seats.add_seat(initial_seat);
state
.common
.shell
.write()
.unwrap()
.seats
.add_seat(initial_seat);
}
res
}