diff options
author | l.mai <l.mai@web.de> | 2007-11-06 00:30:20 +0100 |
---|---|---|
committer | l.mai <l.mai@web.de> | 2007-11-06 00:30:20 +0100 |
commit | c5d58911c45adf44eaa0c76354214c4696bbc88b (patch) | |
tree | 4f06fd3ff6db9e9678946f15b96fe9700fcbcd12 | |
parent | 9814a84c14e9c992d13ad72e45a01b14f7f06c79 (diff) | |
download | XMonadContrib-c5d58911c45adf44eaa0c76354214c4696bbc88b.tar.gz XMonadContrib-c5d58911c45adf44eaa0c76354214c4696bbc88b.tar.xz XMonadContrib-c5d58911c45adf44eaa0c76354214c4696bbc88b.zip |
make LayoutHints compile again
darcs-hash:20071105233020-42ea9-524293c9ebb76b29c181ed45235bd455ff275ce4.gz
-rw-r--r-- | XMonad/Layout/LayoutHints.hs | 13 | ||||
-rw-r--r-- | XMonadContrib.cabal | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/XMonad/Layout/LayoutHints.hs b/XMonad/Layout/LayoutHints.hs index 1268b3f..0bc9a3f 100644 --- a/XMonad/Layout/LayoutHints.hs +++ b/XMonad/Layout/LayoutHints.hs @@ -22,9 +22,9 @@ module XMonad.Layout.LayoutHints ( import XMonad.Operations ( applySizeHints, D ) import Graphics.X11.Xlib import Graphics.X11.Xlib.Extras ( getWMNormalHints ) -import {-#SOURCE#-} Config (borderWidth) import XMonad hiding ( trace ) import XMonad.Layout.LayoutModifier +import Control.Monad.Reader ( asks ) -- $usage -- > import XMonad.Layout.LayoutHints @@ -39,19 +39,20 @@ layoutHints = ModifiedLayout LayoutHints -- | Expand a size by the given multiple of the border width. The -- multiple is most commonly 1 or -1. -adjBorders :: Dimension -> D -> D -adjBorders mult (w,h) = (w+2*mult*borderWidth, h+2*mult*borderWidth) +adjBorders :: Dimension -> Dimension -> D -> D +adjBorders bW mult (w,h) = (w+2*mult*bW, h+2*mult*bW) data LayoutHints a = LayoutHints deriving (Read, Show) instance LayoutModifier LayoutHints Window where modifierDescription _ = "Hinted" redoLayout _ _ _ xs = do - xs' <- mapM applyHint xs + bW <- asks (borderWidth . config) + xs' <- mapM (applyHint bW) xs return (xs', Nothing) where - applyHint (w,Rectangle a b c d) = + applyHint bW (w,Rectangle a b c d) = withDisplay $ \disp -> do sh <- io $ getWMNormalHints disp w - let (c',d') = adjBorders 1 . applySizeHints sh . adjBorders (-1) $ (c,d) + let (c',d') = adjBorders 1 bW . applySizeHints sh . adjBorders bW (-1) $ (c,d) return (w, Rectangle a b c' d') diff --git a/XMonadContrib.cabal b/XMonadContrib.cabal index fba46e8..68b6350 100644 --- a/XMonadContrib.cabal +++ b/XMonadContrib.cabal @@ -65,7 +65,7 @@ library XMonad.Layout.Grid -- XMonad.Layout.HintedTile XMonad.Layout.LayoutCombinators - -- XMonad.Layout.LayoutHints + XMonad.Layout.LayoutHints XMonad.Layout.LayoutModifier XMonad.Layout.LayoutScreens XMonad.Layout.MagicFocus |