mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
Reduce a bit of recently introduced duplication in L.SubLayouts
This commit is contained in:
parent
f8a4dd9503
commit
f0c0f4d5c3
@ -352,12 +352,10 @@ instance (Read (l Window), Show (l Window), LayoutClass l Window) => LayoutModif
|
||||
in fgs $ M.unions $ map mkSingleton ws
|
||||
|
||||
| Just (Merge x y) <- fromMessage m
|
||||
, let findGrp z = mplus (M.lookup z gs) $ listToMaybe
|
||||
$ M.elems $ M.filter ((z `elem`) . W.integrate) gs
|
||||
, Just (W.Stack _ xb xn) <- findGrp x
|
||||
, Just yst <- findGrp y =
|
||||
, Just (W.Stack _ xb xn) <- findGroup x
|
||||
, Just yst <- findGroup y =
|
||||
let zs = W.Stack x xb (xn ++ W.integrate yst)
|
||||
in fgs $ M.update (\_ -> Just zs) x $ M.delete y gs
|
||||
in fgs $ M.insert x zs $ M.delete (W.focus yst) gs
|
||||
|
||||
| Just (UnMerge x) <- fromMessage m =
|
||||
fgs . M.fromList . map (W.focus &&& id) . M.elems
|
||||
|
Loading…
x
Reference in New Issue
Block a user