mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 04:01:51 -07:00
X.A.CycleRecentWS: Make unView work with greedyView as well
Entirely unnecessary for the current version of `cycleWindowSets`, but if anyone ever wants to use `greedyView`, this shows that it's not at all complicated to adapt `unView` to that.
This commit is contained in:
@@ -136,8 +136,9 @@ cycleWindowSets genOptions mods keyNext keyPrev = do
|
||||
-- new 'WindowSet' may have accumulated.
|
||||
unView :: forall i l a s sd. (Eq i, Eq s)
|
||||
=> StackSet i l a s sd -> StackSet i l a s sd -> StackSet i l a s sd
|
||||
unView w0 = fixOrderH . fixOrderV . view (currentTag w0)
|
||||
unView w0 w1 = fixOrderH . fixOrderV . view' (currentTag w0) $ w1
|
||||
where
|
||||
view' = if screen (current w0) == screen (current w1) then greedyView else view
|
||||
fixOrderV w | v : vs <- visible w = w{ visible = insertAt (pfxV (visible w0) vs) v vs }
|
||||
| otherwise = w
|
||||
fixOrderH w | h : hs <- hidden w = w{ hidden = insertAt (pfxH (hidden w0) hs) h hs }
|
||||
|
Reference in New Issue
Block a user