diff options
author | Andrea Rossato <andrea.rossato@unibz.it> | 2008-02-08 09:34:13 +0100 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@unibz.it> | 2008-02-08 09:34:13 +0100 |
commit | fa152381f4e0922fa5b2641eb495775a44463925 (patch) | |
tree | 187eefd32766649bd2245ec65ef5bcbf9820f6f0 | |
parent | 08684f11ebcc50a30a6bd1d9cf5358cf8430d642 (diff) | |
download | XMonadContrib-fa152381f4e0922fa5b2641eb495775a44463925.tar.gz XMonadContrib-fa152381f4e0922fa5b2641eb495775a44463925.tar.xz XMonadContrib-fa152381f4e0922fa5b2641eb495775a44463925.zip |
WindowArranger: add a SetGeometry message - needed to enable mouseDrag
darcs-hash:20080208083413-32816-fe9fcd4589cbd3c7caaff53cb331a54a077e6f6f.gz
-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 |