From 113affe7da02d59013fcaadec17a26f258d360c3 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Thu, 1 Nov 2007 09:00:45 +0100 Subject: Delete Main.hs-boot! darcs-hash:20071101080045-a5988-d3b50a7fe35ff4e38c90e9eb8da1f1963b3b27fd --- Operations.hs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Operations.hs') 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 -- cgit v1.2.3