aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Hooks/Place.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Hooks/Place.hs')
-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)