diff options
author | Jan Vornberger <jan@uos.de> | 2008-08-31 19:19:30 +0200 |
---|---|---|
committer | Jan Vornberger <jan@uos.de> | 2008-08-31 19:19:30 +0200 |
commit | 6a631f6bb2e5507a5a4fcd649001794fc2d4f4f7 (patch) | |
tree | 3b2ba8f98bdde4cdacbdd165cad5d4f7cc6d0566 /Xmobar.hs | |
parent | 121f5cb130fbc169fa6fa0bdbe6ac1c38f5a30a0 (diff) | |
download | xmobar-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
Diffstat (limited to 'Xmobar.hs')
-rw-r--r-- | Xmobar.hs | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |