floating: Add proper recalculate function

Don't just check maximized windows on every refresh, remapping them and
causing flickering, but introduce a proper recalculate method to be
called on layer-shell events / set_output event.

Also if we need to remap, remap all windows to keep stacking order.
This commit is contained in:
Victoria Brekenfeld 2024-06-27 13:32:17 +02:00
parent c27127e44c
commit da9af7ad23
3 changed files with 38 additions and 26 deletions

View file

@ -491,7 +491,7 @@ impl Workspace {
pub fn recalculate(&mut self) {
self.tiling_layer.recalculate();
self.floating_layer.refresh();
self.floating_layer.recalculate();
}
pub fn unmaximize_request(&mut self, elem: &CosmicMapped) -> Option<Size<i32, Logical>> {