mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-14 09:02:45 +02:00
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:
@@ -144,6 +144,7 @@ impl Workspace {
|
|||||||
offset: Option<Rect>,
|
offset: Option<Rect>,
|
||||||
invisible_borders: &Rect,
|
invisible_borders: &Rect,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
|
let container_padding = self.container_padding();
|
||||||
let mut adjusted_work_area = offset.map_or_else(
|
let mut adjusted_work_area = offset.map_or_else(
|
||||||
|| *work_area,
|
|| *work_area,
|
||||||
|offset| {
|
|offset| {
|
||||||
@@ -164,6 +165,7 @@ impl Workspace {
|
|||||||
if *self.tile() {
|
if *self.tile() {
|
||||||
if let Some(container) = self.monocle_container_mut() {
|
if let Some(container) = self.monocle_container_mut() {
|
||||||
if let Some(window) = container.focused_window_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)?;
|
window.set_position(&adjusted_work_area, invisible_borders, true)?;
|
||||||
};
|
};
|
||||||
} else if let Some(window) = self.maximized_window_mut() {
|
} else if let Some(window) = self.maximized_window_mut() {
|
||||||
|
|||||||
Reference in New Issue
Block a user