diff options
author | Andrea Rossato <andrea.rossato@unibz.it> | 2008-01-31 09:23:14 +0100 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@unibz.it> | 2008-01-31 09:23:14 +0100 |
commit | 07f59a98c143519d021bfec4b05a3cc5a569529b (patch) | |
tree | 08fe1b27fb717e5526960c60f931f8efe89b7f24 /XMonad/Layout/Decoration.hs | |
parent | b1eb3fcd01b0b6dd1042d58c54f0901d658efeeb (diff) | |
download | XMonadContrib-07f59a98c143519d021bfec4b05a3cc5a569529b.tar.gz XMonadContrib-07f59a98c143519d021bfec4b05a3cc5a569529b.tar.xz XMonadContrib-07f59a98c143519d021bfec4b05a3cc5a569529b.zip |
Make LayoutHints a decoration aware layout modifier
darcs-hash:20080131082314-32816-665793ea8ce408fe0bc0f3c9ee9a16fa5404c3b7.gz
Diffstat (limited to 'XMonad/Layout/Decoration.hs')
-rw-r--r-- | XMonad/Layout/Decoration.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/XMonad/Layout/Decoration.hs b/XMonad/Layout/Decoration.hs index f205082..24fc133 100644 --- a/XMonad/Layout/Decoration.hs +++ b/XMonad/Layout/Decoration.hs @@ -24,7 +24,7 @@ module XMonad.Layout.Decoration , shrinkText, CustomShrink ( CustomShrink ) , Shrinker (..), DefaultShrinker , module XMonad.Layout.LayoutModifier - , fi + , isDecoration, fi ) where import Data.Maybe @@ -215,6 +215,9 @@ updateDeco sh c fs ((w,_),(dw,Just (Rectangle _ _ wh ht))) = do paintAndWrite dw fs wh ht 1 bc borderc tc bc AlignCenter name updateDeco _ _ _ (_,(w,Nothing)) = hideWindow w +isDecoration :: Window -> X Bool +isDecoration w = withDisplay (io . flip getWindowAttributes w) >>= return . wa_override_redirect + shrinkWhile :: (String -> [String]) -> (String -> X Bool) -> String -> X String shrinkWhile sh p x = sw $ sh x where sw [n] = return n |