diff options
Diffstat (limited to '')
-rw-r--r-- | Magnifier.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Magnifier.hs b/Magnifier.hs index b836d5a..b2103ca 100644 --- a/Magnifier.hs +++ b/Magnifier.hs @@ -45,7 +45,9 @@ unlessMaster :: DoLayout -> DoLayout unlessMaster f r s = if null (up s) then id else f r s applyMagnifier :: DoLayout -applyMagnifier r s = map $ \(w,wr) -> if w == focus s then (w, shrink r $ magnify wr) else (w, wr) +applyMagnifier r s = reverse . foldr accumulate [] + where accumulate (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' |