From 09d1d69668a2fed46156323fb82d804b7bf0df77 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 14 Oct 2021 16:03:53 -0700 Subject: [PATCH] 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 --- komorebi/src/workspace.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/komorebi/src/workspace.rs b/komorebi/src/workspace.rs index fa6840ed..1b279212 100644 --- a/komorebi/src/workspace.rs +++ b/komorebi/src/workspace.rs @@ -144,6 +144,7 @@ impl Workspace { offset: Option, 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() {