diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2009-05-25 05:07:34 +0200 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2009-05-25 05:07:34 +0200 |
commit | aa6bc9f3e9cd1d4436ce14a3da099beee252c3aa (patch) | |
tree | e5efa3d118a5a2a7dcbdb2cb31d19d833bf5c70e /XMonad/Layout | |
parent | aff9f48b358d3f656ca29f46ecf8f8a0bd9decbf (diff) | |
download | XMonadContrib-aa6bc9f3e9cd1d4436ce14a3da099beee252c3aa.tar.gz XMonadContrib-aa6bc9f3e9cd1d4436ce14a3da099beee252c3aa.tar.xz XMonadContrib-aa6bc9f3e9cd1d4436ce14a3da099beee252c3aa.zip |
Fix L.Mosaic bug where stored [Rational] was not extended
Ignore-this: 55bb5b7fabc00f3dcc89e45cc416fc97
darcs-hash:20090525030734-1499c-4b2cbbb9441b51847777ddb33dcc1da68846a360.gz
Diffstat (limited to 'XMonad/Layout')
-rw-r--r-- | XMonad/Layout/Mosaic.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/XMonad/Layout/Mosaic.hs b/XMonad/Layout/Mosaic.hs index ec72611..9376f59 100644 --- a/XMonad/Layout/Mosaic.hs +++ b/XMonad/Layout/Mosaic.hs @@ -118,10 +118,15 @@ instance LayoutClass Mosaic a where rect = rects !! maybe (nls `div` 2) round (nextIx `fmap` state) state' = fmap (\x@(ov,_,_) -> (ov,nextIx x,pred nls)) state `mplus` Just (True,fromIntegral nls / 2,pred nls) - ss' | and $ zipWith (==) ss ssExt = ss - | otherwise = ssExt + ss' = maybe ss (const ss `either` const ssExt) $ zipRemain ss ssExt in return (zip (W.integrate st) rect, Just $ Mosaic state' delta ss') +zipRemain :: [a] -> [b] -> Maybe (Either [a] [b]) +zipRemain (_:xs) (_:ys) = zipRemain xs ys +zipRemain [] [] = Nothing +zipRemain [] y = Just (Right y) +zipRemain x [] = Just (Left x) + -- | These sample functions are meant to be applied to the list of window sizes -- through the 'SlopeMod' message. changeMaster :: (Rational -> Rational) -> X () |