module XMonad.Hooks.ICCCMFocus
{-# DEPRECATED "XMonad.Hooks.ICCCMFocus: xmonad>0.10 core merged issue 177" #-}
(
atom_WM_TAKE_FOCUS
, takeFocusX
, takeTopFocus
) where
import XMonad
import XMonad.Hooks.SetWMName
import qualified XMonad.StackSet as W
takeFocusX ::
Window
-> X ()
takeFocusX :: Window -> X ()
takeFocusX Window
_w = () -> X ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
takeTopFocus ::
X ()
takeTopFocus :: X ()
takeTopFocus =
(WindowSet -> X ()) -> X ()
forall a. (WindowSet -> X a) -> X a
withWindowSet (X () -> (Window -> X ()) -> Maybe Window -> X ()
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (Window -> X ()
setFocusX (Window -> X ()) -> X Window -> X ()
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< (XConf -> Window) -> X Window
forall r (m :: * -> *) a. MonadReader r m => (r -> a) -> m a
asks XConf -> Window
theRoot) Window -> X ()
takeFocusX (Maybe Window -> X ())
-> (WindowSet -> Maybe Window) -> WindowSet -> X ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. WindowSet -> Maybe Window
forall i l a s sd. StackSet i l a s sd -> Maybe a
W.peek) X () -> X () -> X ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> String -> X ()
setWMName String
"LG3D"