diff options
author | Arnout <arnouten@bzzt.net> | 2012-08-29 00:18:46 +0200 |
---|---|---|
committer | Arnout <arnouten@bzzt.net> | 2012-08-29 00:18:46 +0200 |
commit | cae6f2bc049d4b7ed57a7a18a828bc4ea35df4aa (patch) | |
tree | 3446d29a8ac0f3a7cbb41d921dbe998e1404d824 /src/Window.hs | |
parent | e7cadcd8dee8c2e79e338f67cb27b675aba6bac5 (diff) | |
download | xmobar-cae6f2bc049d4b7ed57a7a18a828bc4ea35df4aa.tar.gz xmobar-cae6f2bc049d4b7ed57a7a18a828bc4ea35df4aa.tar.bz2 |
Add '-d' for dockapp mode
This makes xmobar work in windowmanagers that support _NET_WM_WINDOW_TYPE_DOCK
but not _NET_WM_STRUT, such as Notion
Diffstat (limited to 'src/Window.hs')
-rw-r--r-- | src/Window.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Window.hs b/src/Window.hs index 9b0c506..d08e445 100644 --- a/src/Window.hs +++ b/src/Window.hs @@ -66,6 +66,7 @@ setPosition p rs ht = BottomSize a i ch -> (Rectangle (ax a i) (ny' ch) (nw i) (mh ch), True) Static cx cy cw ch -> (Rectangle (fi cx) (fi cy) (fi cw) (fi ch), True) OnScreen _ p'' -> setPosition p'' [scr] ht + Docked -> (Rectangle rx ry rw h, False) where (scr@(Rectangle rx ry rw rh), p') = case p of OnScreen i x -> (fromMaybe (head rs) $ safeIndex i rs, x) @@ -118,6 +119,7 @@ getStrutValues r@(Rectangle x y w h) p rwh = BottomW _ _ -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw] BottomSize {} -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw] Static {} -> getStaticStrutValues p rwh + Docked -> getStaticStrutValues p rwh where st = fi y + fi h sb = rwh - fi y nx = fi x |