diff options
author | Geoff Reedy <geoff@programmer-monk.net> | 2009-06-22 07:19:11 +0200 |
---|---|---|
committer | Geoff Reedy <geoff@programmer-monk.net> | 2009-06-22 07:19:11 +0200 |
commit | 1d4ea11bc589dda326c8e76f69ec1b1d3e2b50d0 (patch) | |
tree | e2f32b6e9c90631ce55186921b65887eb41440c6 /XMonad | |
parent | dadaf8035b28b384d3055a21535569ba738cd493 (diff) | |
download | metatile-1d4ea11bc589dda326c8e76f69ec1b1d3e2b50d0.tar metatile-1d4ea11bc589dda326c8e76f69ec1b1d3e2b50d0.zip |
implement the ICCCM WM_TAKE_FOCUS protocol
Ignore-this: 5b397417dfcf9014ac515a64484cc314
darcs-hash:20090622051911-8d81a-39e45893d4d6e613324c7548affbc34f6e313012
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Core.hs | 5 | ||||
-rw-r--r-- | XMonad/Operations.hs | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/XMonad/Core.hs b/XMonad/Core.hs index b8ba1b1..ba7aebf 100644 --- a/XMonad/Core.hs +++ b/XMonad/Core.hs @@ -26,7 +26,7 @@ module XMonad.Core ( runX, catchX, userCode, userCodeDef, io, catchIO, installSignalHandlers, uninstallSignalHandlers, withDisplay, withWindowSet, isRoot, runOnWorkspaces, getAtom, spawn, spawnPID, xfork, getXMonadDir, recompile, trace, whenJust, whenX, - atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW, ManageHook, Query(..), runQuery + atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW, atom_WM_TAKE_FOCUS, ManageHook, Query(..), runQuery ) where import XMonad.StackSet hiding (modify) @@ -204,10 +204,11 @@ getAtom :: String -> X Atom getAtom str = withDisplay $ \dpy -> io $ internAtom dpy str False -- | Common non-predefined atoms -atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW, atom_WM_STATE :: X Atom +atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW, atom_WM_STATE, atom_WM_TAKE_FOCUS :: X Atom atom_WM_PROTOCOLS = getAtom "WM_PROTOCOLS" atom_WM_DELETE_WINDOW = getAtom "WM_DELETE_WINDOW" atom_WM_STATE = getAtom "WM_STATE" +atom_WM_TAKE_FOCUS = getAtom "WM_TAKE_FOCUS" ------------------------------------------------------------------------ -- LayoutClass handling. See particular instances in Operations.hs diff --git a/XMonad/Operations.hs b/XMonad/Operations.hs index f89c5ef..4aa5003 100644 --- a/XMonad/Operations.hs +++ b/XMonad/Operations.hs @@ -325,7 +325,8 @@ setFocusX w = withWindowSet $ \ws -> do -- If we ungrab buttons on the root window, we lose our mouse bindings. whenX (not <$> isRoot w) $ setButtonGrab False w - io $ setInputFocus dpy w revertToPointerRoot 0 + io $ do setInputFocus dpy w revertToPointerRoot 0 + -- raiseWindow dpy w ------------------------------------------------------------------------ -- Message handling |