aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Hooks
diff options
context:
space:
mode:
authorquentin.moser <quentin.moser@unifr.ch>2009-04-09 10:49:46 +0200
committerquentin.moser <quentin.moser@unifr.ch>2009-04-09 10:49:46 +0200
commit8835e1f4502ae48e02c67708e320119ad6dda855 (patch)
tree4d04c65413bd4be8f3e62ff666ef9d2c156ec5ab /XMonad/Hooks
parentb9a915babbd8b07250a20eaf47726f5abf372946 (diff)
downloadXMonadContrib-8835e1f4502ae48e02c67708e320119ad6dda855.tar.gz
XMonadContrib-8835e1f4502ae48e02c67708e320119ad6dda855.tar.xz
XMonadContrib-8835e1f4502ae48e02c67708e320119ad6dda855.zip
Fixed X.H.Place.position
Ignore-this: 29e3936800194916a859976ff126dbfe darcs-hash:20090409084946-5ccef-e312bdd8cb5e5474064a18ca9f026ab11a66d6e1.gz
Diffstat (limited to 'XMonad/Hooks')
-rw-r--r--XMonad/Hooks/Place.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/XMonad/Hooks/Place.hs b/XMonad/Hooks/Place.hs
index 5c42b3f..af2b3b8 100644
--- a/XMonad/Hooks/Place.hs
+++ b/XMonad/Hooks/Place.hs
@@ -40,7 +40,7 @@ import XMonad.Layout.WindowArranger
import XMonad.Actions.FloatKeys
import qualified Data.Map as M
-import Data.List (sortBy, maximumBy)
+import Data.List (sortBy, minimumBy)
import Data.Maybe (maybe)
import Data.Monoid (Endo(..))
import Control.Monad.Trans (lift, liftIO)
@@ -347,7 +347,7 @@ position :: [Rectangle] -- ^ Free areas
-> Position -> Position -- ^ Ideal coordinates
-> Dimension -> Dimension -- ^ Width and height of the window
-> Rectangle
-position rs x y w h = maximumBy distanceOrder $ map closest rs
+position rs x y w h = minimumBy distanceOrder $ map closest rs
where distanceOrder r1 r2
= compare (distance (rect_x r1,rect_y r1) (x,y) :: Dimension)
(distance (rect_x r2,rect_y r2) (x,y) :: Dimension)