From 9beaa3dd5735f6d4b4c0b5edf353367e8f109274 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Thu, 4 Jun 2009 14:35:09 +0200 Subject: X.L.ResizableTile: make sure windows aren't resized to a height larger than the screen (fixes #298) darcs-hash:20090604123509-1e371-90746027e0f8e07d20da14637204f288430e2eb9.gz --- XMonad/Layout/ResizableTile.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'XMonad/Layout/ResizableTile.hs') diff --git a/XMonad/Layout/ResizableTile.hs b/XMonad/Layout/ResizableTile.hs index e0330f6..9ba6d8c 100644 --- a/XMonad/Layout/ResizableTile.hs +++ b/XMonad/Layout/ResizableTile.hs @@ -108,7 +108,7 @@ splitVertically [] _ r = [r] splitVertically _ n r | n < 2 = [r] splitVertically (f:fx) n (Rectangle sx sy sw sh) = Rectangle sx sy sw smallh : splitVertically fx (n-1) (Rectangle sx (sy+fromIntegral smallh) sw (sh-smallh)) - where smallh = floor $ fromIntegral (sh `div` fromIntegral n) * f --hmm, this is a fold or map. + where smallh = min sh (floor $ fromIntegral (sh `div` fromIntegral n) * f) --hmm, this is a fold or map. splitHorizontallyBy :: RealFrac r => r -> Rectangle -> (Rectangle, Rectangle) splitHorizontallyBy f (Rectangle sx sy sw sh) = -- cgit v1.2.3