[xmonad] Issue 177 in xmonad: xmonad does not follow ICCCM and ignores WM_TAKE_FOCUS protocol

codesite-noreply at google.com codesite-noreply at google.com
Thu Jun 11 17:49:32 EDT 2009


Comment #10 on issue 177 by nils.decker: xmonad does not follow ICCCM and  
ignores WM_TAKE_FOCUS protocol
http://code.google.com/p/xmonad/issues/detail?id=177

This works as a logHook too. No need to patch xmonad

       logHook            = takeTopFocus >> setWMName "LG3D", -- fix java Bug


-- Send WM_TAKE_FOCUS
takeTopFocus = withWindowSet $ maybe (setFocusX =<< asks theRoot)  
takeFocusX . W.peek

atom_WM_TAKE_FOCUS      = getAtom "WM_TAKE_FOCUS"
takeFocusX w = withWindowSet $ \ws -> do
     dpy <- asks display
     wmtakef <- atom_WM_TAKE_FOCUS
     wmprot <- atom_WM_PROTOCOLS

     protocols <- io $ getWMProtocols dpy w
     when (wmtakef `elem` protocols) $ do
         io $ allocaXEvent $ \ev -> do
             setEventType ev clientMessage
             setClientMessageEvent ev w wmprot 32 wmtakef currentTime
             sendEvent dpy w False noEventMask ev


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


More information about the xmonad mailing list