diff options
author | Daniel Schoepe <asgaroth_@gmx.de> | 2009-01-10 23:18:52 +0100 |
---|---|---|
committer | Daniel Schoepe <asgaroth_@gmx.de> | 2009-01-10 23:18:52 +0100 |
commit | 0de6932e70ef3120c3830943d88484b06df9354a (patch) | |
tree | e648564798a0353aa022269891cc4c750a340b3c /XMonad/Operations.hs | |
parent | 9e3bb2d5ef72b43da045c628f78ccfcdb209cf19 (diff) | |
download | xmonad-0de6932e70ef3120c3830943d88484b06df9354a.tar.gz xmonad-0de6932e70ef3120c3830943d88484b06df9354a.tar.xz xmonad-0de6932e70ef3120c3830943d88484b06df9354a.zip |
More flexible userCode function
darcs-hash:20090110221852-cb1c6-80f042287c9c6b704a37a2704e29841416aeca9b.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Operations.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/XMonad/Operations.hs b/XMonad/Operations.hs index 8cc1710..fe124f3 100644 --- a/XMonad/Operations.hs +++ b/XMonad/Operations.hs @@ -23,7 +23,7 @@ import XMonad.Layout (Full(..)) import qualified XMonad.StackSet as W import Data.Maybe -import Data.Monoid (appEndo) +import Data.Monoid (Endo(..)) import Data.List (nub, (\\), find) import Data.Bits ((.|.), (.&.), complement) import Data.Ratio @@ -68,7 +68,7 @@ manage w = whenX (not <$> isClient w) $ withDisplay $ \d -> do where i = W.tag $ W.workspace $ W.current ws mh <- asks (manageHook . config) - g <- fmap appEndo (runQuery mh w) `catchX` return id + g <- fmap appEndo $ userCodeDef (Endo id) (runQuery mh w) windows (g . f) -- | unmanage. A window no longer exists, remove it from the window @@ -169,7 +169,7 @@ windows f = do isMouseFocused <- asks mouseFocused unless isMouseFocused $ clearEvents enterWindowMask - asks (logHook . config) >>= userCode + asks (logHook . config) >>= userCodeDef () -- | Produce the actual rectangle from a screen and a ratio on that screen. scaleRationalRect :: Rectangle -> W.RationalRect -> Rectangle |