mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-05-17 01:07:02 +02:00
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:
@@ -111,13 +111,11 @@ 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}"
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user