diff options
-rw-r--r-- | Config.hs | 5 | ||||
-rw-r--r-- | Config.hs-boot | 3 | ||||
-rw-r--r-- | Operations.hs | 2 |
3 files changed, 6 insertions, 4 deletions
@@ -28,6 +28,7 @@ import Data.Bits ((.|.)) import qualified Data.Map as M import System.Exit import Graphics.X11.Xlib +import Graphics.X11.Xlib.Extras (ClassHint(..)) -- Extension-provided imports @@ -62,8 +63,8 @@ modMask = mod1Mask defaultGaps :: [(Int,Int,Int,Int)] defaultGaps = [(0,0,0,0)] -- 15 for default dzen -manageHook :: Window -> X (WindowSet -> WindowSet) -manageHook _ = return id +manageHook :: Window -> ClassHint -> X (WindowSet -> WindowSet) +manageHook _ _ = return id -- | -- numlock handling: diff --git a/Config.hs-boot b/Config.hs-boot index 906ee3b..7c364c2 100644 --- a/Config.hs-boot +++ b/Config.hs-boot @@ -1,10 +1,11 @@ module Config where import Graphics.X11.Xlib.Types (Dimension) import Graphics.X11.Xlib (KeyMask,Window) +import Graphics.X11.Xlib.Extras (ClassHint) import XMonad borderWidth :: Dimension logHook :: X () numlockMask :: KeyMask workspaces :: [WorkspaceId] possibleLayouts :: [SomeLayout Window] -manageHook :: Window -> X (WindowSet -> WindowSet) +manageHook :: Window -> ClassHint -> X (WindowSet -> WindowSet) diff --git a/Operations.hs b/Operations.hs index 3e447be..41ee9c2 100644 --- a/Operations.hs +++ b/Operations.hs @@ -63,7 +63,7 @@ manage w = whenX (fmap not $ isClient w) $ withDisplay $ \d -> do f ws | isFixedSize || isTransient = W.float w (adjust rr) . W.insertUp w . W.view i $ ws | otherwise = W.insertUp w ws where i = fromMaybe (W.tag . W.workspace . W.current $ ws) $ W.lookupWorkspace sc ws - g <- manageHook w + g <- manageHook w =<< io (getClassHint d w) windows (g . f) -- | unmanage. A window no longer exists, remove it from the window |