aboutsummaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 09:00:45 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 09:00:45 +0100
commit109b7e0d38bc3ab3781c78882db35e182a489e7f (patch)
tree10a6b2c257025f73ccc57336b15e8978f5ff13c5 /Operations.hs
parent9b93fc161e659b7d3d478e1b5a9a711a31968967 (diff)
downloadxmonad-109b7e0d38bc3ab3781c78882db35e182a489e7f.tar.gz
xmonad-109b7e0d38bc3ab3781c78882db35e182a489e7f.tar.xz
xmonad-109b7e0d38bc3ab3781c78882db35e182a489e7f.zip
Delete Main.hs-boot!
darcs-hash:20071101080045-a5988-d3b50a7fe35ff4e38c90e9eb8da1f1963b3b27fd.gz
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/Operations.hs b/Operations.hs
index f3fa64f..ae6d8e1 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -37,8 +37,6 @@ import Graphics.X11.Xlib
import Graphics.X11.Xinerama (getScreenInfo)
import Graphics.X11.Xlib.Extras
-import {-# SOURCE #-} Main (numlockMask)
-
-- ---------------------------------------------------------------------
-- |
-- Window manager operations
@@ -367,12 +365,16 @@ isClient w = withWindowSet $ return . W.member w
-- | Combinations of extra modifier masks we need to grab keys\/buttons for.
-- (numlock and capslock)
-extraModifiers :: [KeyMask]
-extraModifiers = [0, numlockMask, lockMask, numlockMask .|. lockMask ]
+extraModifiers :: X [KeyMask]
+extraModifiers = do
+ nlm <- asks (numlockMask . config)
+ return [0, nlm, lockMask, nlm .|. lockMask ]
-- | Strip numlock\/capslock from a mask
-cleanMask :: KeyMask -> KeyMask
-cleanMask = (complement (numlockMask .|. lockMask) .&.)
+cleanMask :: KeyMask -> X KeyMask
+cleanMask km = do
+ nlm <- asks (numlockMask . config)
+ return (complement (nlm .|. lockMask) .&. km)
-- | Get the Pixel value for a named color
initColor :: Display -> String -> IO Pixel