From 8d67f1ea8c614f12ddfc77d5727fb7fd8472484b Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Tue, 5 Dec 2023 18:06:33 -0700 Subject: Fixed problem with the hole layout where it was not passing on the focused window correctly --- src/Rahm/Desktop/Layout/Hole.hs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/Rahm/Desktop/Layout') diff --git a/src/Rahm/Desktop/Layout/Hole.hs b/src/Rahm/Desktop/Layout/Hole.hs index d00cc29..8bebb36 100644 --- a/src/Rahm/Desktop/Layout/Hole.hs +++ b/src/Rahm/Desktop/Layout/Hole.hs @@ -89,18 +89,19 @@ instance (LayoutClass l a, a ~ Window) => LayoutClass (Hole l) a where | Just positions <- sortIt <$> Map.lookup t mp = let integrated = W.integrate s in W.Workspace t l $ - W.differentiate $ - addr integrated $ - foldl - ( \((idx, pos, fakeid), ret) w -> - case pos of - ((TilePosition _ n, win) : tpos) - | n == idx && win `notElem` integrated -> - ((idx + 1, tpos, fakeid - 1), w : fakeid : ret) - _ -> ((idx + 1, pos, fakeid), w : ret) - ) - ((0, positions, -1), []) - integrated + W.differentiateWithFocus (W.focus s) $ + reverse $ + addr integrated $ + foldl + ( \((idx, pos, fakeid), ret) w -> + case pos of + ((TilePosition _ n, win) : tpos) + | n == idx && win `notElem` integrated -> + ((idx + 1, tpos, fakeid - 1), w : fakeid : ret) + _ -> ((idx + 1, pos, fakeid), w : ret) + ) + ((0, positions, -1), []) + integrated app _ w = w sortIt = sortOn (\(TilePosition _ p, _) -> p) -- cgit