X.A.WindowGo: Add a haddock comment to raiseNextMaybeCustomFocus

This commit is contained in:
Ivan Malison 2016-11-03 19:21:52 -07:00
parent 0e1cecd135
commit c51bd739d7
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -144,6 +144,10 @@ raiseNext = raiseNextMaybe $ return ()
raiseNextMaybe :: X () -> Query Bool -> X () raiseNextMaybe :: X () -> Query Bool -> X ()
raiseNextMaybe = raiseNextMaybeCustomFocus W.focusWindow raiseNextMaybe = raiseNextMaybeCustomFocus W.focusWindow
{- | See 'raiseMaybe' and 'raiseNextMaybe'.
In addition to all of the options offered by 'raiseNextMaybe'
'raiseNextMaybeCustomFocus' allows the user to supply the function that
should be used to shift the focus to any window that is found. -}
raiseNextMaybeCustomFocus :: (Window -> WindowSet -> WindowSet) -> X() -> Query Bool -> X() raiseNextMaybeCustomFocus :: (Window -> WindowSet -> WindowSet) -> X() -> Query Bool -> X()
raiseNextMaybeCustomFocus focusFn f qry = flip (ifWindows qry) f $ \ws -> do raiseNextMaybeCustomFocus focusFn f qry = flip (ifWindows qry) f $ \ws -> do
foc <- withWindowSet $ return . W.peek foc <- withWindowSet $ return . W.peek