aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout/Magnifier.hs
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2008-10-05 21:02:20 +0200
committerJoachim Breitner <mail@joachim-breitner.de>2008-10-05 21:02:20 +0200
commit1e67a3f13c5ff800ebc6756deee22abb2e4fc6ba (patch)
tree7ba95eb3e9c225ee33881d42cd58c2b3ba7b4247 /XMonad/Layout/Magnifier.hs
parent72778301857e5ba4e34cbb2bc822612beefb36f2 (diff)
downloadXMonadContrib-1e67a3f13c5ff800ebc6756deee22abb2e4fc6ba.tar.gz
XMonadContrib-1e67a3f13c5ff800ebc6756deee22abb2e4fc6ba.tar.xz
XMonadContrib-1e67a3f13c5ff800ebc6756deee22abb2e4fc6ba.zip
Merge emptyLayoutMod into redoLayout
This removes the emptyLayoutMod method from the LayoutModifier class, and change the Stack parameter to redoLayout to a Maybe Stack one. It also changes all affected code. This should should be a refactoring without any change in program behaviour. darcs-hash:20081005190220-23c07-4701517e3433ecff8c999da75ac582f6f1b65c19.gz
Diffstat (limited to '')
-rw-r--r--XMonad/Layout/Magnifier.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/XMonad/Layout/Magnifier.hs b/XMonad/Layout/Magnifier.hs
index d9af9da..b27f2c7 100644
--- a/XMonad/Layout/Magnifier.hs
+++ b/XMonad/Layout/Magnifier.hs
@@ -114,10 +114,9 @@ data Toggle = On | Off deriving (Read, Show)
data MagnifyMaster = All | NoMaster deriving (Read, Show)
instance LayoutModifier Magnifier Window where
- redoLayout (Mag z On All ) = applyMagnifier z
- redoLayout (Mag z On NoMaster) = unlessMaster $ applyMagnifier z
- redoLayout _ = nothing
- where nothing _ _ wrs = return (wrs, Nothing)
+ redoLayout (Mag z On All ) r (Just s) wrs = applyMagnifier z r s wrs
+ redoLayout (Mag z On NoMaster) r (Just s) wrs = unlessMaster (applyMagnifier z) r s wrs
+ redoLayout _ _ _ wrs = return (wrs, Nothing)
handleMess (Mag z On t) m
| Just MagnifyMore <- fromMessage m = return . Just $ (Mag (z `addto` 0.1) On t)