aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorGeoff Reedy <geoff@programmer-monk.net>2009-06-22 07:19:11 +0200
committerGeoff Reedy <geoff@programmer-monk.net>2009-06-22 07:19:11 +0200
commit84c82295e440abed68e43ee2334154e869223e22 (patch)
treee2f32b6e9c90631ce55186921b65887eb41440c6 /XMonad
parentda9d918dc3ccf11f10c5fedb30f5fdc5c7be5022 (diff)
downloadxmonad-84c82295e440abed68e43ee2334154e869223e22.tar.gz
xmonad-84c82295e440abed68e43ee2334154e869223e22.tar.xz
xmonad-84c82295e440abed68e43ee2334154e869223e22.zip
implement the ICCCM WM_TAKE_FOCUS protocol
Ignore-this: 5b397417dfcf9014ac515a64484cc314 darcs-hash:20090622051911-8d81a-39e45893d4d6e613324c7548affbc34f6e313012.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Core.hs5
-rw-r--r--XMonad/Operations.hs3
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