fix(wm): apply window based offsets to monocles

This commit ensures that when a window_based_work_area_offset is set,
and the window limit is greater than 0, the offset will be applied to
monocle containers on a workspace (unless an override is specified for
that workspace).
This commit is contained in:
LGUG2Z
2024-07-24 10:46:55 -07:00
parent 780635c8ef
commit c367967301
2 changed files with 7 additions and 8 deletions
+1 -3
View File
@@ -111,15 +111,13 @@ pub fn handle_notifications(wm: Arc<Mutex<WindowManager>>) -> color_eyre::Result
"failed to make monocle window {hwnd} opaque: {error}" "failed to make monocle window {hwnd} opaque: {error}"
) )
} }
} else { } else if let Err(error) = window.transparent() {
if let Err(error) = window.transparent() {
let hwnd = window.hwnd; let hwnd = window.hwnd;
tracing::error!( tracing::error!(
"failed to make monocle window {hwnd} transparent: {error}" "failed to make monocle window {hwnd} transparent: {error}"
) )
} }
} }
}
continue 'monitors; continue 'monitors;
} }
+2 -1
View File
@@ -267,7 +267,8 @@ impl Workspace {
}, },
); );
if self.containers().len() <= window_based_work_area_offset_limit as usize if (self.containers().len() <= window_based_work_area_offset_limit as usize
|| self.monocle_container().is_some() && window_based_work_area_offset_limit > 0)
&& self.apply_window_based_work_area_offset && self.apply_window_based_work_area_offset
{ {
adjusted_work_area = window_based_work_area_offset.map_or_else( adjusted_work_area = window_based_work_area_offset.map_or_else(