chore: Move some rendering-related state into the shell

This commit is contained in:
Victoria Brekenfeld 2024-06-07 19:51:47 +02:00 committed by Victoria Brekenfeld
parent cd90371c1e
commit cf0b0f9d2d
6 changed files with 45 additions and 43 deletions

View file

@ -1671,17 +1671,10 @@ impl State {
}
#[cfg(feature = "debug")]
Action::Debug => {
self.common.egui.active = !self.common.egui.active;
for mapped in self
.common
.shell
.read()
.unwrap()
.workspaces
.spaces()
.flat_map(|w| w.mapped())
{
mapped.set_debug(self.common.egui.active);
let mut shell = self.common.shell.write().unwrap();
shell.debug_active = !shell.debug_active;
for mapped in shell.workspaces.spaces().flat_map(|w| w.mapped()) {
mapped.set_debug(shell.debug_active);
}
}
#[cfg(not(feature = "debug"))]