diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-12-10 03:10:30 +0100 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-12-10 03:10:30 +0100 |
commit | 772561fdc3473de8063aecf7fc099782239c55f9 (patch) | |
tree | d996f86bf692bd4e8b606b33a2601f6c55063a30 /XMonad | |
parent | 88f7b273bde97e2b4506b81b12e3b9180ff59fba (diff) | |
download | XMonadContrib-772561fdc3473de8063aecf7fc099782239c55f9.tar.gz XMonadContrib-772561fdc3473de8063aecf7fc099782239c55f9.tar.xz XMonadContrib-772561fdc3473de8063aecf7fc099782239c55f9.zip |
ManageDocks: when there are struts on opposing edges, the right/bottom strut
was ignored. TODO: quickchecks
darcs-hash:20071210021030-a5988-652b63b2819da15c435f7411bc8bc60d679a25a0.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Hooks/ManageDocks.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/XMonad/Hooks/ManageDocks.hs b/XMonad/Hooks/ManageDocks.hs index e215b49..6d800d6 100644 --- a/XMonad/Hooks/ManageDocks.hs +++ b/XMonad/Hooks/ManageDocks.hs @@ -111,8 +111,9 @@ fi = fromIntegral -- | Given strut values and the screen rectangle, compute a reduced screen -- rectangle. reduceScreen :: (Int, Int, Int, Int) -> Rectangle -> Rectangle -reduceScreen (t, b, l, r) (Rectangle rx ry rw rh) - = Rectangle (rx + fi l) (ry + fi t) (rw - fi r) (rh - fi b) +reduceScreen (t, b, l, r) s + = case r2c s of + (x1, y1, x2, y2) -> c2r (x1 + fi l, y1 + fi t, x2 - fi r, y2 - fi b) r2c :: Rectangle -> (Position, Position, Position, Position) r2c (Rectangle x y w h) = (x, y, x + fi w, y + fi h) |