From 8835e1f4502ae48e02c67708e320119ad6dda855 Mon Sep 17 00:00:00 2001 From: "quentin.moser" Date: Thu, 9 Apr 2009 10:49:46 +0200 Subject: Fixed X.H.Place.position Ignore-this: 29e3936800194916a859976ff126dbfe darcs-hash:20090409084946-5ccef-e312bdd8cb5e5474064a18ca9f026ab11a66d6e1.gz --- XMonad/Hooks/Place.hs | 4 ++-- 1 file 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) -- cgit v1.2.3