iced: Optimize updates

This commit is contained in:
Victoria Brekenfeld 2025-04-24 19:00:01 +02:00 committed by Victoria Brekenfeld
parent 7c222ae6d1
commit 0be83fe930
3 changed files with 21 additions and 20 deletions

View file

@ -381,7 +381,6 @@ impl CosmicStack {
if update {
self.0
.resize(Size::from((self.active().geometry().size.w, TAB_HEIGHT)));
self.0.force_update();
}
result
@ -436,7 +435,6 @@ impl CosmicStack {
if !matches!(result, MoveResult::Default) {
self.0
.resize(Size::from((self.active().geometry().size.w, TAB_HEIGHT)));
self.0.force_update();
}
result
@ -1208,7 +1206,6 @@ impl SpaceElement for CosmicStack {
})
}
fn refresh(&self) {
SpaceElement::refresh(&self.0);
self.0.with_program(|p| {
let mut windows = p.windows.lock().unwrap();
@ -1245,6 +1242,7 @@ impl SpaceElement for CosmicStack {
SpaceElement::refresh(w)
});
});
SpaceElement::refresh(&self.0);
}
}