aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout/ResizableTile.hs
diff options
context:
space:
mode:
authorBrent Yorgey <byorgey@cis.upenn.edu>2009-06-04 14:35:09 +0200
committerBrent Yorgey <byorgey@cis.upenn.edu>2009-06-04 14:35:09 +0200
commit9beaa3dd5735f6d4b4c0b5edf353367e8f109274 (patch)
tree18a2c84e2db37687eff798eda83a3d7af94c8d7f /XMonad/Layout/ResizableTile.hs
parent1606ba5951d9e1ffe1bde2068b90d55e9812e256 (diff)
downloadXMonadContrib-9beaa3dd5735f6d4b4c0b5edf353367e8f109274.tar.gz
XMonadContrib-9beaa3dd5735f6d4b4c0b5edf353367e8f109274.tar.xz
XMonadContrib-9beaa3dd5735f6d4b4c0b5edf353367e8f109274.zip
X.L.ResizableTile: make sure windows aren't resized to a height larger than the screen (fixes #298)
darcs-hash:20090604123509-1e371-90746027e0f8e07d20da14637204f288430e2eb9.gz
Diffstat (limited to 'XMonad/Layout/ResizableTile.hs')
-rw-r--r--XMonad/Layout/ResizableTile.hs2
1 files changed, 1 insertions, 1 deletions
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) =