Add margins for auto-hide panels without exclusive zones

Works alongside panel changes in
https://github.com/pop-os/cosmic-panel/pull/485.

We can't set an exclusive zone in the panel, since that would cause all
the workspaces to re-layout to make space for it, and also impact
workspace capture. Instead, cosmic-workspaces reads the config and adds
appropriate margins.
This commit is contained in:
Ian Douglas Scott 2025-11-10 14:45:18 -08:00 committed by Ian Douglas Scott
parent 41a940660c
commit 04edd3b909
2 changed files with 53 additions and 1 deletions

View file

@ -150,6 +150,10 @@ pub(crate) fn layer_surface<'a>(
.width(Length::Fill),
),
};
let panel_regions = app.panel_regions(&surface.output);
let container = widget::container(container).padding(panel_regions);
let output = surface.output.clone();
widget::mouse_area(container)
.on_scroll(move |delta| Msg::OnScroll(output.clone(), delta))