diff options
author | Lukas Mai <l.mai@web.de> | 2008-04-05 00:05:58 +0200 |
---|---|---|
committer | Lukas Mai <l.mai@web.de> | 2008-04-05 00:05:58 +0200 |
commit | b9fb7f750e00e35363832fdd398366621eabb2d3 (patch) | |
tree | 75bcecb0786330bd29780184a277ef49b46079c7 /XMonad/Layout/LayoutHints.hs | |
parent | 80a15fa2d0e0d0bc9e70ff4bbe1ee3b0e3194bff (diff) | |
download | XMonadContrib-b9fb7f750e00e35363832fdd398366621eabb2d3.tar.gz XMonadContrib-b9fb7f750e00e35363832fdd398366621eabb2d3.tar.xz XMonadContrib-b9fb7f750e00e35363832fdd398366621eabb2d3.zip |
update contrib for applySizeHints changes
darcs-hash:20080404220558-462cf-2d7837b574aec854a158213d45a34cca75e38438.gz
Diffstat (limited to 'XMonad/Layout/LayoutHints.hs')
-rw-r--r-- | XMonad/Layout/LayoutHints.hs | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/XMonad/Layout/LayoutHints.hs b/XMonad/Layout/LayoutHints.hs index f8aa47b..ca139ed 100644 --- a/XMonad/Layout/LayoutHints.hs +++ b/XMonad/Layout/LayoutHints.hs @@ -42,22 +42,15 @@ import XMonad.Layout.Decoration ( isInStack ) layoutHints :: (LayoutClass l a) => l a -> ModifiedLayout LayoutHints l a layoutHints = ModifiedLayout LayoutHints --- | Expand a size by the given multiple of the border width. The --- multiple is most commonly 1 or -1. -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 _ _ s xs = do - bW <- asks (borderWidth . config) - xs' <- mapM (applyHint bW) xs + xs' <- mapM applyHint xs return (xs', Nothing) where - applyHint bW (w,r@(Rectangle a b c d)) = - withDisplay $ \disp -> do - sh <- io $ getWMNormalHints disp w - let (c',d') = adjBorders 1 bW . applySizeHints sh . adjBorders bW (-1) $ (c,d) - return (w, if isInStack s w then Rectangle a b c' d' else r) + applyHint (w,r@(Rectangle a b c d)) = do + adj <- mkAdjust w + let (c',d') = adj (c,d) + return (w, if isInStack s w then Rectangle a b c' d' else r) |