diff options
| author | Josh Rahm <rahm@google.com> | 2023-12-05 18:06:33 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2023-12-05 18:06:33 -0700 |
| commit | 8d67f1ea8c614f12ddfc77d5727fb7fd8472484b (patch) | |
| tree | d048a9d74954c616340162198d51dea36d5b942c /src/Rahm/Desktop/Layout | |
| parent | 122b51770305f3f22050ba7000d168e298eb1661 (diff) | |
| download | rde-8d67f1ea8c614f12ddfc77d5727fb7fd8472484b.tar.gz rde-8d67f1ea8c614f12ddfc77d5727fb7fd8472484b.tar.bz2 rde-8d67f1ea8c614f12ddfc77d5727fb7fd8472484b.zip | |
Fixed problem with the hole layout where it was not passing on the focused window correctly
Diffstat (limited to 'src/Rahm/Desktop/Layout')
| -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) |