summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJan Vornberger <jan@uos.de>2008-08-31 19:19:30 +0200
committerJan Vornberger <jan@uos.de>2008-08-31 19:19:30 +0200
commit6a631f6bb2e5507a5a4fcd649001794fc2d4f4f7 (patch)
tree3b2ba8f98bdde4cdacbdd165cad5d4f7cc6d0566
parent121f5cb130fbc169fa6fa0bdbe6ac1c38f5a30a0 (diff)
downloadxmobar-6a631f6bb2e5507a5a4fcd649001794fc2d4f4f7.tar.gz
xmobar-6a631f6bb2e5507a5a4fcd649001794fc2d4f4f7.tar.bz2
onscreen-pos-strut-property-fix
The _NET_WM_STRUT_PARTIAL property is now also set correctly when using the position command OnScreen darcs-hash:20080831171930-25ab1-78961e6bebf8776a96f42166711d217000d4ca6e.gz
-rw-r--r--Xmobar.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Xmobar.hs b/Xmobar.hs
index 671741d..add13e7 100644
--- a/Xmobar.hs
+++ b/Xmobar.hs
@@ -170,16 +170,17 @@ setProperties r c d w = do
a2 <- internAtom d "_NET_WM_WINDOW_TYPE" False
c2 <- internAtom d "ATOM" False
v <- internAtom d "_NET_WM_WINDOW_TYPE_DOCK" False
- changeProperty32 d w a1 c1 propModeReplace $ map fi $ getStrutValues r c
+ changeProperty32 d w a1 c1 propModeReplace $ map fi $ getStrutValues r (position c)
changeProperty32 d w a2 c2 propModeReplace [fromIntegral v]
-getStrutValues :: Rectangle -> Config -> [Int]
-getStrutValues (Rectangle x _ w h) c =
- case position c of
+getStrutValues :: Rectangle -> XPosition -> [Int]
+getStrutValues r@(Rectangle x _ w h) p =
+ case p of
Top -> [0, 0, nh, 0, 0, 0, 0, 0, nx, nw, 0, 0]
TopW _ _ -> [0, 0, nh, 0, 0, 0, 0, 0, nx, nw, 0, 0]
Bottom -> [0, 0, 0, nh, 0, 0, 0, 0, 0, 0, nx, nw]
BottomW _ _ -> [0, 0, 0, nh, 0, 0, 0, 0, 0, 0, nx, nw]
+ OnScreen _ p' -> getStrutValues r p'
_ -> [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
where nh = fi h
nx = fi x