mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-15 20:23:55 -07:00
Added missing boundary check in Layout.Spacing.shrinkRect
This commit is contained in:
@@ -93,7 +93,7 @@ instance LayoutModifier SpacingWithEdge a where
|
|||||||
modifierDescription (SpacingWithEdge p) = "SpacingWithEdge " ++ show p
|
modifierDescription (SpacingWithEdge p) = "SpacingWithEdge " ++ show p
|
||||||
|
|
||||||
shrinkRect :: Int -> Rectangle -> Rectangle
|
shrinkRect :: Int -> Rectangle -> Rectangle
|
||||||
shrinkRect p (Rectangle x y w h) = Rectangle (x+fi p) (y+fi p) (w-2*fi p) (h-2*fi p)
|
shrinkRect p (Rectangle x y w h) = Rectangle (x+fi p) (y+fi p) (fi $ max 1 $ fi w-2*p) (fi $ max 1 $ fi h-2*p)
|
||||||
|
|
||||||
-- | Surrounds all windows with blank space, except when the window is the only
|
-- | Surrounds all windows with blank space, except when the window is the only
|
||||||
-- visible window on the current workspace.
|
-- visible window on the current workspace.
|
||||||
|
Reference in New Issue
Block a user