diff options
author | David Roundy <droundy@darcs.net> | 2007-06-20 14:54:20 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-06-20 14:54:20 +0200 |
commit | 236effe4663e4eb5e0510c22b1095ecb5d7defcb (patch) | |
tree | 3301529355ca2d29c604d6cd34449bc96741eddc /Magnifier.hs | |
parent | 0fd45e3280f3f7252a5ad7c2e110eacafa75e5df (diff) | |
download | XMonadContrib-236effe4663e4eb5e0510c22b1095ecb5d7defcb.tar.gz XMonadContrib-236effe4663e4eb5e0510c22b1095ecb5d7defcb.tar.xz XMonadContrib-236effe4663e4eb5e0510c22b1095ecb5d7defcb.zip |
make some layouts more general.
darcs-hash:20070620125420-72aca-2802515a9c62727f8a8e53fdb480bbb5588f50e2.gz
Diffstat (limited to 'Magnifier.hs')
-rw-r--r-- | Magnifier.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Magnifier.hs b/Magnifier.hs index 7f27dfb..cfe4c12 100644 --- a/Magnifier.hs +++ b/Magnifier.hs @@ -30,11 +30,11 @@ import StackSet -- > import XMonadContrib.Magnifier -- > defaultLayouts = [ magnifier tiled , magnifier $ mirror tiled ] -magnifier :: Layout Window -> Layout Window +magnifier :: Eq a => Layout a -> Layout a magnifier l = l { doLayout = \r s -> applyMagnifier r s `fmap` doLayout l r s , modifyLayout = \x -> fmap magnifier `fmap` modifyLayout l x } -applyMagnifier :: Rectangle -> Stack Window -> [(Window, Rectangle)] -> [(Window, Rectangle)] +applyMagnifier :: Eq a => Rectangle -> Stack a -> [(a, Rectangle)] -> [(a, Rectangle)] applyMagnifier r s | null (up s) = id -- don't change the master window | otherwise = map $ \(w,wr) -> if w == focus s then (w, shrink r $ magnify wr) else (w, wr) |