GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
refactor(infra,domain): rename `RectDelta` properties
Lars Berger38d8c2885091
diff --git a/GlazeWM.Domain/Containers/CommandHandlers/RedrawContainersHandler.cs b/GlazeWM.Domain/Containers/CommandHandlers/RedrawContainersHandler.csindex 3730e775..1bc9433c 100644--- a/GlazeWM.Domain/Containers/CommandHandlers/RedrawContainersHandler.cs+++ b/GlazeWM.Domain/Containers/CommandHandlers/RedrawContainersHandler.cs@@ -70,10 +70,10 @@ namespace GlazeWM.Domain.Containers.CommandHandlersSetWindowPos(window.Handle,IntPtr.Zero,- window.X - window.BorderDelta.DeltaLeft,- window.Y - window.BorderDelta.DeltaTop,- window.Width + window.BorderDelta.DeltaLeft + window.BorderDelta.DeltaRight,- window.Height + window.BorderDelta.DeltaTop + window.BorderDelta.DeltaRight,+ window.X - window.BorderDelta.Left,+ window.Y - window.BorderDelta.Top,+ window.Width + window.BorderDelta.Left + window.BorderDelta.Right,+ window.Height + window.BorderDelta.Top + window.BorderDelta.Right,flags);return;diff --git a/GlazeWM.Domain/Windows/CommandHandlers/ResizeWindowBordersHandler.cs b/GlazeWM.Domain/Windows/CommandHandlers/ResizeWindowBordersHandler.csindex 8c44bee8..3f66fc8a 100644--- a/GlazeWM.Domain/Windows/CommandHandlers/ResizeWindowBordersHandler.cs+++ b/GlazeWM.Domain/Windows/CommandHandlers/ResizeWindowBordersHandler.cs@@ -26,10 +26,10 @@ namespace GlazeWM.Domain.Windows.CommandHandlers// TODO: Move default border delta into some sort of shared state.var defaultBorderDelta = new RectDelta(7, 0, 7, 7);windowToResize.BorderDelta = new RectDelta(- defaultBorderDelta.DeltaLeft + borderDelta.DeltaLeft,- defaultBorderDelta.DeltaTop + borderDelta.DeltaTop,- defaultBorderDelta.DeltaRight + borderDelta.DeltaRight,- defaultBorderDelta.DeltaBottom + borderDelta.DeltaBottom+ defaultBorderDelta.Left + borderDelta.Left,+ defaultBorderDelta.Top + borderDelta.Top,+ defaultBorderDelta.Right + borderDelta.Right,+ defaultBorderDelta.Bottom + borderDelta.Bottom);// No need to redraw if window isn't tiling.diff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowMovedOrResizedHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowMovedOrResizedHandler.csindex 65762868..4d5afab4 100644--- a/GlazeWM.Domain/Windows/EventHandlers/WindowMovedOrResizedHandler.cs+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowMovedOrResizedHandler.cs@@ -74,10 +74,10 @@ namespace GlazeWM.Domain.Windows.EventHandlersvar currentPlacement = WindowService.GetPlacementOfHandle(window.Handle).NormalPosition;var adjustedPlacement = new WindowRect{- Left = currentPlacement.Left + window.BorderDelta.DeltaLeft,- Right = currentPlacement.Right - window.BorderDelta.DeltaRight,- Top = currentPlacement.Top + window.BorderDelta.DeltaTop,- Bottom = currentPlacement.Bottom - window.BorderDelta.DeltaBottom,+ Left = currentPlacement.Left + window.BorderDelta.Left,+ Right = currentPlacement.Right - window.BorderDelta.Right,+ Top = currentPlacement.Top + window.BorderDelta.Top,+ Bottom = currentPlacement.Bottom - window.BorderDelta.Bottom,};var deltaWidth = adjustedPlacement.Width - window.Width;diff --git a/GlazeWM.Infrastructure/WindowsApi/RectDelta.cs b/GlazeWM.Infrastructure/WindowsApi/RectDelta.csindex c8ce2942..79a1be62 100644--- a/GlazeWM.Infrastructure/WindowsApi/RectDelta.cs+++ b/GlazeWM.Infrastructure/WindowsApi/RectDelta.cs@@ -5,29 +5,29 @@/// <summary>/// The difference in x-coordinates of the upper-left corner of the rectangle./// </summary>- public int DeltaLeft { get; }+ public int Left { get; }/// <summary>/// The difference in y-coordinates of the upper-left corner of the rectangle./// </summary>- public int DeltaTop { get; }+ public int Top { get; }/// <summary>/// The difference in x-coordinates of the lower-right corner of the rectangle./// </summary>- public int DeltaRight { get; }+ public int Right { get; }/// <summary>/// The difference in y-coordinates of the lower-right corner of the rectangle./// </summary>- public int DeltaBottom { get; }+ public int Bottom { get; }- public RectDelta(int deltaLeft, int deltaTop, int deltaRight, int deltaBottom)+ public RectDelta(int left, int top, int right, int bottom){- DeltaLeft = deltaLeft;- DeltaRight = deltaRight;- DeltaTop = deltaTop;- DeltaBottom = deltaBottom;+ Left = left;+ Right = right;+ Top = top;+ Bottom = bottom;}}}