aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Hooks
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2013-01-17 19:08:51 +0100
committerAdam Vogt <vogt.adam@gmail.com>2013-01-17 19:08:51 +0100
commitf87a080883a65040e9ef638fb65ab5f28cfc9a14 (patch)
tree046fee47a1952ed64a27b2908deda6c1a1203c8b /XMonad/Hooks
parent8ddbb295aabb24362c49dd368b64a08cd48c3aa9 (diff)
downloadXMonadContrib-f87a080883a65040e9ef638fb65ab5f28cfc9a14.tar.gz
XMonadContrib-f87a080883a65040e9ef638fb65ab5f28cfc9a14.tar.xz
XMonadContrib-f87a080883a65040e9ef638fb65ab5f28cfc9a14.zip
Unconditionally set _NET_WORKAREA in ManageDocks
Ignore-this: 9f57e53fba9573d8a92cf153beb7fe7a darcs-hash:20130117180851-1499c-e9ad10c3f203247cd8bc5120e1e3c15a9053ad93.gz
Diffstat (limited to 'XMonad/Hooks')
-rw-r--r--XMonad/Hooks/ManageDocks.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/XMonad/Hooks/ManageDocks.hs b/XMonad/Hooks/ManageDocks.hs
index 901afa8..4e85c24 100644
--- a/XMonad/Hooks/ManageDocks.hs
+++ b/XMonad/Hooks/ManageDocks.hs
@@ -208,6 +208,7 @@ instance Message SetStruts
instance LayoutModifier AvoidStruts a where
modifyLayout (AvoidStruts ss) w r = do
nr <- fmap ($ r) (calcGap ss)
+ setWorkarea nr
runLayout w nr
pureMess (AvoidStruts ss) m
@@ -222,6 +223,13 @@ instance LayoutModifier AvoidStruts a where
toggleOne x xs | x `S.member` xs = S.delete x xs
| otherwise = x `S.insert` xs
+setWorkarea :: Rectangle -> X ()
+setWorkarea (Rectangle x y w h) = withDisplay $ \dpy -> do
+ a <- getAtom "_NET_WORKAREA"
+ c <- getAtom "CARDINAL"
+ r <- asks theRoot
+ io $ changeProperty32 dpy r a c propModeReplace [fi x, fi y, fi w, fi h]
+
-- | (Direction, height\/width, initial pixel, final pixel).