mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Merge remote-tracking branch 'origin/pjones/rmworkarea' into release-0.13
This commit is contained in:
commit
d2ffb75031
@ -245,7 +245,9 @@ instance Message SetStruts
|
|||||||
instance LayoutModifier AvoidStruts a where
|
instance LayoutModifier AvoidStruts a where
|
||||||
modifyLayout (AvoidStruts ss) w r = do
|
modifyLayout (AvoidStruts ss) w r = do
|
||||||
srect <- fmap ($ r) (calcGap ss)
|
srect <- fmap ($ r) (calcGap ss)
|
||||||
setWorkarea srect
|
-- Ensure _NET_WORKAREA is not set.
|
||||||
|
-- See: https://github.com/xmonad/xmonad-contrib/pull/79
|
||||||
|
rmWorkarea
|
||||||
runLayout w srect
|
runLayout w srect
|
||||||
|
|
||||||
pureMess as@(AvoidStruts ss) m
|
pureMess as@(AvoidStruts ss) m
|
||||||
@ -261,13 +263,11 @@ instance LayoutModifier AvoidStruts a where
|
|||||||
toggleOne x xs | x `S.member` xs = S.delete x xs
|
toggleOne x xs | x `S.member` xs = S.delete x xs
|
||||||
| otherwise = x `S.insert` xs
|
| otherwise = x `S.insert` xs
|
||||||
|
|
||||||
setWorkarea :: Rectangle -> X ()
|
rmWorkarea :: X ()
|
||||||
setWorkarea (Rectangle x y w h) = withDisplay $ \dpy -> do
|
rmWorkarea = withDisplay $ \dpy -> do
|
||||||
a <- getAtom "_NET_WORKAREA"
|
a <- getAtom "_NET_WORKAREA"
|
||||||
c <- getAtom "CARDINAL"
|
|
||||||
r <- asks theRoot
|
r <- asks theRoot
|
||||||
io $ changeProperty32 dpy r a c propModeReplace [fi x, fi y, fi w, fi h]
|
io (deleteProperty dpy r a)
|
||||||
|
|
||||||
|
|
||||||
-- | (Direction, height\/width, initial pixel, final pixel).
|
-- | (Direction, height\/width, initial pixel, final pixel).
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user