From 6d2d3006806eb73959a6c5d68896f7bc05c6598e Mon Sep 17 00:00:00 2001 From: Jason Creighton Date: Wed, 6 Jun 2007 02:50:56 +0200 Subject: move extraModifiers/cleanMask to Operations.hs so XMonadContrib can use them darcs-hash:20070606005056-b9aa7-96a3bb09f8e6dabd707eed7b5f19d733e5e1778e.gz --- Operations.hs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Operations.hs') diff --git a/Operations.hs b/Operations.hs index a4d077d..a45a23b 100644 --- a/Operations.hs +++ b/Operations.hs @@ -16,11 +16,11 @@ module Operations where import XMonad import qualified StackSet as W -import {-# SOURCE #-} Config (borderWidth,logging) +import {-# SOURCE #-} Config (borderWidth,logging,numlockMask) import Data.Maybe import Data.List (genericIndex, intersectBy, partition, delete) -import Data.Bits ((.|.)) +import Data.Bits ((.|.), (.&.), complement) import Data.Ratio import qualified Data.Map as M @@ -433,6 +433,15 @@ withFocused f = withWindowSet $ \w -> whenJust (W.peek w) f isClient :: Window -> X Bool 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 ] + +-- | Strip numlock/capslock from a mask +cleanMask :: KeyMask -> KeyMask +cleanMask = (complement (numlockMask .|. lockMask) .&.) + ------------------------------------------------------------------------ -- | Floating layer support -- cgit v1.2.3