diff options
Diffstat (limited to 'src/Rahm/Desktop/Layout/Hole.hs')
| -rw-r--r-- | src/Rahm/Desktop/Layout/Hole.hs | 25 |
1 files changed, 13 insertions, 12 deletions
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) |