From 75c02d646e82a2ec17c4766361b678415db62d7e Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Mon, 1 Oct 2007 19:52:46 +0200 Subject: Send ClassHints to manageHook darcs-hash:20071001175246-a5988-008bb0123ca85784c32884ea5e6452747e1df0fb --- Config.hs | 5 +++-- Config.hs-boot | 3 ++- Operations.hs | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Config.hs b/Config.hs index 3f403c1..1bf6445 100644 --- a/Config.hs +++ b/Config.hs @@ -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 -- cgit v1.2.3