mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-15 04:05:53 -07:00
Fix L.Mosaic bug where stored [Rational] was not extended
This commit is contained in:
@@ -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 ()
|
||||
|
Reference in New Issue
Block a user