fix(wm): apply container padding in monocle mode

This commit ensures that any configured container padding is also
applied when monocle mode is enabled for containers in any/all layouts.

fix #49
This commit is contained in:
LGUG2Z
2021-10-14 16:03:53 -07:00
parent 786f5e846a
commit 09d1d69668

View File

@@ -144,6 +144,7 @@ impl Workspace {
offset: Option<Rect>,
invisible_borders: &Rect,
) -> Result<()> {
let container_padding = self.container_padding();
let mut adjusted_work_area = offset.map_or_else(
|| *work_area,
|offset| {
@@ -164,6 +165,7 @@ impl Workspace {
if *self.tile() {
if let Some(container) = self.monocle_container_mut() {
if let Some(window) = container.focused_window_mut() {
adjusted_work_area.add_padding(container_padding);
window.set_position(&adjusted_work_area, invisible_borders, true)?;
};
} else if let Some(window) = self.maximized_window_mut() {