1
0
mirror of https://github.com/xmonad/xmonad-contrib.git synced 2025-08-13 19:25:52 -07:00

Added missing boundary check in Layout.Spacing.shrinkRect

This commit is contained in:
bb-h8
2016-01-26 21:27:49 +01:00
parent b20e7fa1e4
commit baf1dd9251

@@ -93,7 +93,7 @@ instance LayoutModifier SpacingWithEdge a where
modifierDescription (SpacingWithEdge p) = "SpacingWithEdge " ++ show p
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
-- visible window on the current workspace.