From 37686643cbfdc9e015edcba437d744f98cc9d06e Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Wed, 26 Dec 2012 02:38:41 +0100 Subject: Change type of X.A.ShowText.handleTimerEvent so example code typechecks. Ignore-this: 3c58a9ff124ab02325df6f38e0eaec05 darcs-hash:20121226013841-1499c-f01ab4a7d15b904b55abf44f5f19a4733b8305bc.gz --- XMonad/Actions/ShowText.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'XMonad/Actions') 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 -- cgit v1.2.3