aboutsummaryrefslogtreecommitdiffstats
path: root/Magnifier.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Magnifier.hs')
-rw-r--r--Magnifier.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Magnifier.hs b/Magnifier.hs
index da18c2e..584d869 100644
--- a/Magnifier.hs
+++ b/Magnifier.hs
@@ -43,9 +43,9 @@ unlessMaster mainmod r s wrs = if null (up s) then return (wrs, Nothing)
else mainmod r s wrs
applyMagnifier :: Eq a => ModDo a
-applyMagnifier r s wrs = return (map mag wrs, Nothing)
- where mag (w,wr) | w == focus s = (w, shrink r $ magnify wr)
- | otherwise = (w,wr)
+applyMagnifier r s wrs = return (reverse $ foldr mag [] wrs, Nothing)
+ where mag (w,wr) ws | w == focus s = ws ++ [(w, shrink r $ magnify wr)]
+ | otherwise = (w,wr) : ws
magnify :: Rectangle -> Rectangle
magnify (Rectangle x y w h) = Rectangle x' y' w' h'