diff options
author | David Roundy <droundy@darcs.net> | 2007-05-16 04:21:23 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-05-16 04:21:23 +0200 |
commit | b6c8cfcec548a0fc1c473ef8aeb691a1f3322c55 (patch) | |
tree | d29dd827e41c44fa006acabb462cdaf9773f1ca5 /Mosaic.hs | |
parent | ac881f1e18f1e41924e7526faf17c5f1f5022b81 (diff) | |
download | XMonadContrib-b6c8cfcec548a0fc1c473ef8aeb691a1f3322c55.tar.gz XMonadContrib-b6c8cfcec548a0fc1c473ef8aeb691a1f3322c55.tar.xz XMonadContrib-b6c8cfcec548a0fc1c473ef8aeb691a1f3322c55.zip |
throttle the exponential expense when many windows are present.
darcs-hash:20070516022123-72aca-6ddd484c729d2a107c263e263a451228179e3cc8.gz
Diffstat (limited to 'Mosaic.hs')
-rw-r--r-- | Mosaic.hs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -50,6 +50,9 @@ expandWindow = ExpandWindow shrinkWindow = ShrinkWindow squareWindow = SquareWindow +largeNumber :: Int +largeNumber = 1000 + mosaic :: Rational -> Rational -> M.Map NamedWindow WindowRater -> M.Map NamedWindow Area -> Layout mosaic delta tileFrac raters areas = Layout { doLayout = mosaicL tileFrac raters areas , modifyLayout = mlayout } @@ -109,7 +112,7 @@ mosaicL f raters areas origRect origws map (fmap M . catRated . map (\(ws',r') -> my_mosaic r' (otherDirection d) ws')) $ map (\ws' -> zip ws' $ partitionR d r $ map sumareas ws') $ - init $ allsplits ws + take largeNumber $ init $ allsplits ws where minL [] = myerror "minL on empty list" minL [a] = a minL (a:b:c) = minL (min a b:c) |