aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaniel <daniel@wagner-home.com>2008-03-21 11:46:05 +0100
committerdaniel <daniel@wagner-home.com>2008-03-21 11:46:05 +0100
commitaf88859f7275000a3bc09f0c4b4878fe5e35e1be (patch)
tree0ad6d565975e615e03651c60d5c25218af424e60
parentefefb727b8c35bcf2bb98cb136a7e992d9b00c5f (diff)
downloadXMonadContrib-af88859f7275000a3bc09f0c4b4878fe5e35e1be.tar.gz
XMonadContrib-af88859f7275000a3bc09f0c4b4878fe5e35e1be.tar.xz
XMonadContrib-af88859f7275000a3bc09f0c4b4878fe5e35e1be.zip
allow magnifier to toggle whether it's active
darcs-hash:20080321104605-c98ca-a7a7093ed198ecd299ad132dd5f69fe60f6dcc03.gz
-rw-r--r--XMonad/Layout/Magnifier.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/XMonad/Layout/Magnifier.hs b/XMonad/Layout/Magnifier.hs
index d7e73aa..ef959ec 100644
--- a/XMonad/Layout/Magnifier.hs
+++ b/XMonad/Layout/Magnifier.hs
@@ -88,7 +88,7 @@ magnifierOff = ModifiedLayout (Mag 1.5 Off All)
magnifiercz' :: Rational -> l a -> ModifiedLayout Magnifier l a
magnifiercz' cz = ModifiedLayout (Mag ((fromRational cz)*1.0::Double) On NoMaster)
-data MagnifyMsg = MagnifyMore | MagnifyLess | ToggleOn | ToggleOff deriving ( Typeable )
+data MagnifyMsg = MagnifyMore | MagnifyLess | ToggleOn | ToggleOff | Toggle deriving ( Typeable )
instance Message MagnifyMsg
data Magnifier a = Mag Zoom Toggle MagnifyMaster deriving (Read, Show)
@@ -108,8 +108,10 @@ instance LayoutModifier Magnifier Window where
| Just MagnifyMore <- fromMessage m = return . Just $ (Mag (z + 0.1) On t)
| Just MagnifyLess <- fromMessage m = return . Just $ (Mag (z - 0.1) On t)
| Just ToggleOff <- fromMessage m = return . Just $ (Mag (z ) Off t)
+ | Just Toggle <- fromMessage m = return . Just $ (Mag (z ) Off t)
handleMess (Mag z Off t) m
| Just ToggleOn <- fromMessage m = return . Just $ (Mag z On t)
+ | Just Toggle <- fromMessage m = return . Just $ (Mag z On t)
handleMess _ _ = return Nothing
modifierDescription (Mag _ On All ) = "Magnifier"