state: Move shell behind RwLock
This commit is contained in:
parent
647deb81f1
commit
5d5a510691
45 changed files with 2657 additions and 2097 deletions
13
src/theme.rs
13
src/theme.rs
|
|
@ -32,13 +32,12 @@ pub fn watch_theme(handle: LoopHandle<'_, State>) -> Result<(), cosmic_config::E
|
|||
|
||||
if theme.theme_type != new_theme.theme_type {
|
||||
*theme = new_theme;
|
||||
state.common.shell.set_theme(theme.clone());
|
||||
state.common.shell.workspaces.spaces().for_each(|s| {
|
||||
s.mapped().for_each(|m| {
|
||||
m.update_theme(theme.clone());
|
||||
m.force_redraw();
|
||||
})
|
||||
});
|
||||
let mut workspace_guard = state.common.workspace_state.update();
|
||||
state.common.shell.write().unwrap().set_theme(
|
||||
theme.clone(),
|
||||
&state.common.xdg_activation_state,
|
||||
&mut workspace_guard,
|
||||
);
|
||||
}
|
||||
}) {
|
||||
tracing::error!("{e}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue