diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2012-12-26 02:38:41 +0100 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2012-12-26 02:38:41 +0100 |
commit | 37686643cbfdc9e015edcba437d744f98cc9d06e (patch) | |
tree | 2db5f05c113b79cf797cc4453e5f734c2aefedc2 /XMonad | |
parent | 4de8bd8f16645933fa995557b2cf4c5b9d64d520 (diff) | |
download | XMonadContrib-37686643cbfdc9e015edcba437d744f98cc9d06e.tar.gz XMonadContrib-37686643cbfdc9e015edcba437d744f98cc9d06e.tar.xz XMonadContrib-37686643cbfdc9e015edcba437d744f98cc9d06e.zip |
Change type of X.A.ShowText.handleTimerEvent so example code typechecks.
Ignore-this: 3c58a9ff124ab02325df6f38e0eaec05
darcs-hash:20121226013841-1499c-f01ab4a7d15b904b55abf44f5f19a4733b8305bc.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Actions/ShowText.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/XMonad/Actions/ShowText.hs b/XMonad/Actions/ShowText.hs index 3d9bff5..1a2ac5c 100644 --- a/XMonad/Actions/ShowText.hs +++ b/XMonad/Actions/ShowText.hs @@ -23,6 +23,7 @@ module XMonad.Actions.ShowText import Control.Monad (when) import Data.Map (Map,empty,insert,lookup) +import Data.Monoid (mempty, All) import Prelude hiding (lookup) import XMonad import XMonad.StackSet (current,screen) @@ -78,13 +79,14 @@ defaultSTConfig = } -- | Handles timer events that notify when a window should be removed -handleTimerEvent :: Event -> X () +handleTimerEvent :: Event -> X All handleTimerEvent (ClientMessageEvent _ _ _ dis _ mtyp d) = do (ShowText m) <- ES.get :: X ShowText a <- io $ internAtom dis "XMONAD_TIMER" False when (mtyp == a && length d >= 1) (whenJust (lookup (fromIntegral $ d !! 0) m) deleteWindow) -handleTimerEvent _ = return () + mempty +handleTimerEvent _ = mempty -- | Shows a window in the center of the screen with the given text flashText :: ShowTextConfig |