From dc2ed66c903b482182da14f3570cf182d4d126c4 Mon Sep 17 00:00:00 2001 From: silvarc141 <56596650+silvarc141@users.noreply.github.com> Date: Sat, 21 Oct 2023 10:31:47 +0200 Subject: [PATCH] fix: correct workspace size with Y offset and bar on bottom (#430) --- GlazeWM.Domain/Workspaces/Workspace.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GlazeWM.Domain/Workspaces/Workspace.cs b/GlazeWM.Domain/Workspaces/Workspace.cs index 9774702b6..bff0cdea4 100644 --- a/GlazeWM.Domain/Workspaces/Workspace.cs +++ b/GlazeWM.Domain/Workspaces/Workspace.cs @@ -64,7 +64,7 @@ public override int Height return Parent.Height - _outerGaps.Top - _outerGaps.Bottom; } - return Parent.Height - _outerGaps.Top - _outerGaps.Bottom - floatBarOffsetY - _logicalBarHeight; + return Parent.Height - _outerGaps.Top - _outerGaps.Bottom - (barForMonitor.Position == BarPosition.Top ? floatBarOffsetY : -floatBarOffsetY) - _logicalBarHeight; } } @@ -74,7 +74,7 @@ public override int Y { get { - if (!_userConfigService.GetBarConfigForMonitor(Parent as Monitor).Enabled) + if (!_userConfigService.GetBarConfigForMonitor(Parent as Monitor).Enabled || barForMonitor.Position == BarPosition.Bottom) { return Parent.Y + _outerGaps.Top; }