1
0
mirror of https://github.com/xmonad/xmonad-contrib.git synced 2025-08-17 13:24:14 -07:00
Files
.github
XMonad
Actions
Config
Doc
Hooks
StatusBar
CurrentWorkspaceOnTop.hs
DebugEvents.hs
DebugKeyEvents.hs
DebugStack.hs
DynamicBars.hs
DynamicHooks.hs
DynamicIcons.hs
DynamicLog.hs
DynamicProperty.hs
EwmhDesktops.hs
FadeInactive.hs
FadeWindows.hs
FloatNext.hs
Focus.hs
ICCCMFocus.hs
InsertPosition.hs
ManageDebug.hs
ManageDocks.hs
ManageHelpers.hs
Minimize.hs
Place.hs
PositionStoreHooks.hs
RefocusLast.hs
Rescreen.hs
RestoreMinimized.hs
ScreenCorners.hs
Script.hs
ServerMode.hs
SetWMName.hs
StatusBar.hs
ToggleHook.hs
UrgencyHook.hs
WallpaperSetter.hs
WindowSwallowing.hs
WorkspaceByPos.hs
WorkspaceHistory.hs
XPropManage.hs
Layout
Prompt
Util
Doc.hs
Prelude.hs
Prompt.hs
scripts
tests
.gitignore
.mailmap
CHANGES.md
LICENSE
README.md
Setup.lhs
cabal.haskell-ci
cabal.project
stack-master.yaml
xmonad-contrib.cabal
xmonad-contrib/XMonad/Hooks/ICCCMFocus.hs
slotThe bd5b969d9b Apply hlint hints
All hints are applied in one single commit, as a commit per hint would
result in 80+ separate commits—tihs is really just too much noise.

Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-06-06 18:59:05 +02:00

43 lines
1.1 KiB
Haskell

-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.ICCCMFocus
-- License : BSD
--
-- Maintainer : Tony Morris <haskell@tmorris.net>
--
-- Implemented in your @logHook@, Java swing applications will not misbehave
-- when it comes to taking and losing focus.
--
-- This has been done by taking the patch in <http://code.google.com/p/xmonad/issues/detail?id=177> and refactoring it so that it can be included in @~\/.xmonad\/xmonad.hs@.
--
-- @
-- conf' =
-- conf {
-- logHook = takeTopFocus
-- }
-- @
-----------------------------------------------------------------------------
module XMonad.Hooks.ICCCMFocus
{-# DEPRECATED "XMonad.Hooks.ICCCMFocus: xmonad>0.10 core merged issue 177" #-}
(
atom_WM_TAKE_FOCUS
, takeFocusX
, takeTopFocus
) where
import XMonad
import XMonad.Hooks.SetWMName
import qualified XMonad.StackSet as W
takeFocusX ::
Window
-> X ()
takeFocusX _w = return ()
-- | The value to add to your log hook configuration.
takeTopFocus ::
X ()
takeTopFocus =
withWindowSet (maybe (setFocusX =<< asks theRoot) takeFocusX . W.peek) >> setWMName "LG3D"