# HG changeset patch # User Augie Fackler # Date 1320245637 18000 # Node ID 93a8f55a4e301539dbdfb4eeff482b2de3056658 # Parent 09c0d4ed07f30da7f3ef8f3838cd681503491e3a xmonad: add takeTopFocus logHook This is required to make IntelliJ (and supposedly all other Swing applications) properly notice that they've recieved the focus. According to [0], the problem is that "xmonad does not follow ICCCM and ignores WM_TAKE_FOCUS protocol", but the patches on that ticket haven't yet been accepted, so the function was added to xmonad-contrib as a workaround until something happens in xmonad proper. [0]: http://code.google.com/p/xmonad/issues/detail?id=177 diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -3,6 +3,7 @@ import XMonad import XMonad import XMonad.Config.Gnome import XMonad.Hooks.ManageDocks +import XMonad.Hooks.ICCCMFocus import XMonad.Layout import XMonad.Layout.Column import XMonad.Layout.LayoutBuilder @@ -26,6 +27,7 @@ main = do { terminal = "urxvt -sr -bg Black -fg White" , modMask = mod4Mask , layoutHook = avoidStruts myLayout + , logHook = takeTopFocus } `additionalKeys` [ ((mod4Mask, xK_a), spawn "gnome-screensaver-command --lock") , ((mod4Mask, xK_p), spawn myDmenuTitleBar)