From 6a631f6bb2e5507a5a4fcd649001794fc2d4f4f7 Mon Sep 17 00:00:00 2001 From: Jan Vornberger Date: Sun, 31 Aug 2008 19:19:30 +0200 Subject: 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 --- Xmobar.hs | 9 +++++---- 1 file 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 -- cgit v1.2.3