[xmonad] Applied: java-swing-application-focus-patch.dpatch

Samir Unni srunni at gmail.com
Thu Jan 6 18:21:58 CET 2011


On 01/06/2011 10:59 AM, adam vogt wrote:
> I mistakenly used an xmonad-core that defines and exports that missing
> definition. Later today I will be able to fix the repo (with "darcs
> rollback"), but in the meantime you can remove it using "darcs unpull"
> in your copy of repository.
>
> For reference, the incorrect patch is this one:
> http://code.haskell.org/XMonadContrib/_darcs/patches/20110106033839-1499c-1c0085216af2bc3d460ab26a7be21dae85c83a30.gz

That's the patch to fix the problem, not rollback the commit, right? 
Because it doesn't match what I'm seeing in H.ICCCMFocus right now:

>  20 module XMonad.Hooks.ICCCMFocus
>  21 (
>  22   takeFocusX
>  23 , takeTopFocus
>  24 ) where
>  25
>  26 import XMonad
>  27 import XMonad.Hooks.SetWMName
>  28 import qualified XMonad.StackSet as W
>  29 import Control.Monad
>  30
>  31 takeFocusX ::
>  32   Window
>  33   -> X ()
>  34 takeFocusX w =
>  35   withWindowSet . const $ do
>  36     dpy       <- asks display
>  37     wmtakef   <- atom_WM_TAKE_FOCUS
>  38     wmprot    <- atom_WM_PROTOCOLS
>  39     protocols <- io $ getWMProtocols dpy w
>  40     when (wmtakef `elem` protocols) $
>  41       io . allocaXEvent $ \ev -> do
>  42           setEventType ev clientMessage
>  43           setClientMessageEvent ev w wmprot 32 wmtakef currentTime
>  44           sendEvent dpy w False noEventMask ev
>  45
>  46 -- | The value to add to your log hook configuration.
>  47 takeTopFocus ::
>  48   X ()
>  49 takeTopFocus =
>  50   (withWindowSet $ maybe (setFocusX =<< asks theRoot) takeFocusX . W.peek) >> setWMName "LG3D"

The only place atom_WM_TAKE_FOCUS appears is at line 37. It's not 
present at lines 22 or 31, like in your patch.



More information about the xmonad mailing list