mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-06 06:51:55 -07:00
Swapped pickSomething for <|> in doHybridNavigation.
This commit is contained in:
@@ -770,11 +770,9 @@ doCenterNavigation dir (cur, rect) winrects
|
|||||||
-- | Implements Hybrid navigation. This attempts Line navigation first,
|
-- | Implements Hybrid navigation. This attempts Line navigation first,
|
||||||
-- then falls back on Center navigation if it finds no suitable target window.
|
-- then falls back on Center navigation if it finds no suitable target window.
|
||||||
doHybridNavigation :: Eq a => Direction2D -> Rect a -> [Rect a] -> Maybe a
|
doHybridNavigation :: Eq a => Direction2D -> Rect a -> [Rect a] -> Maybe a
|
||||||
doHybridNavigation = applyToBoth pickSomething doLineNavigation doCenterNavigation
|
doHybridNavigation = applyToBoth (<|>) doLineNavigation doCenterNavigation
|
||||||
where
|
where
|
||||||
applyToBoth f g h a b c = f (g a b c) (h a b c)
|
applyToBoth f g h a b c = f (g a b c) (h a b c)
|
||||||
pickSomething Nothing b = b
|
|
||||||
pickSomething a _ = a
|
|
||||||
|
|
||||||
-- | Swaps the current window with the window given as argument
|
-- | Swaps the current window with the window given as argument
|
||||||
swap :: Window -> WindowSet -> WindowSet
|
swap :: Window -> WindowSet -> WindowSet
|
||||||
|
Reference in New Issue
Block a user