diff options
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Layout/WindowArranger.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/XMonad/Layout/WindowArranger.hs b/XMonad/Layout/WindowArranger.hs index c0b0597..5fe2a17 100644 --- a/XMonad/Layout/WindowArranger.hs +++ b/XMonad/Layout/WindowArranger.hs @@ -90,6 +90,7 @@ data WindowArrangerMsg = DeArrange | MoveRight Int | MoveUp Int | MoveDown Int + | SetGeometry Rectangle deriving ( Typeable ) instance Message WindowArrangerMsg @@ -103,7 +104,7 @@ data WindowArranger a = WA Bool ArrangeAll [ArrangedWindow a] deriving (Read, Sh instance (Show a, Read a, Eq a) => LayoutModifier WindowArranger a where pureModifier (WA True b []) _ _ wrs = arrangeWindows b wrs - pureModifier (WA True b awrs) _ (S.Stack w _ _) wrs = curry process wrs awrs + pureModifier (WA True b awrs) _ (S.Stack w _ _) wrs = curry process wrs awrs where wins = map fst *** map awrWin update (a,r) = mkNewAWRs b a *** removeAWRs r >>> uncurry (++) @@ -134,6 +135,9 @@ instance (Show a, Read a, Eq a) => LayoutModifier WindowArranger a where fa = fromAWR wr chk x y = fi $ max 1 (fi x - y) + pureMess (WA t b (wr:wrs)) m + | Just (SetGeometry r) <- fromMessage m, (w,_) <- fromAWR wr = Just . WA t b $ AWR (w,r):wrs + pureMess (WA _ b l) m | Just DeArrange <- fromMessage m = Just $ WA False b l | Just Arrange <- fromMessage m = Just $ WA True b l |