summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-10-01 19:52:46 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-10-01 19:52:46 +0200
commit75c02d646e82a2ec17c4766361b678415db62d7e (patch)
treedec6ab2db805fd21a8117e883e0dee089e629d91
parentd4a93abae6e1e07b855cb156cdec21bd404ce477 (diff)
downloadmetatile-75c02d646e82a2ec17c4766361b678415db62d7e.tar
metatile-75c02d646e82a2ec17c4766361b678415db62d7e.zip
Send ClassHints to manageHook
darcs-hash:20071001175246-a5988-008bb0123ca85784c32884ea5e6452747e1df0fb
-rw-r--r--Config.hs5
-rw-r--r--Config.hs-boot3
-rw-r--r--Operations.hs2
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