aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 09:47:44 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 09:47:44 +0100
commit22b5bb4358c7531885e5d136270dbebdcf261c11 (patch)
tree5c78c8f86be5b0cfb7fb596189a77fa8417fbe63
parentbc4f1660b11f3f3eed4bd7170a30f7c015da026c (diff)
downloadXMonadContrib-22b5bb4358c7531885e5d136270dbebdcf261c11.tar.gz
XMonadContrib-22b5bb4358c7531885e5d136270dbebdcf261c11.tar.xz
XMonadContrib-22b5bb4358c7531885e5d136270dbebdcf261c11.zip
Port Submap
darcs-hash:20071101084744-a5988-65b66876cf5f599fe90241b5c4cd8d0e41d7fbc2.gz
-rw-r--r--Submap.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Submap.hs b/Submap.hs
index 4d655ef..b0f0a68 100644
--- a/Submap.hs
+++ b/Submap.hs
@@ -57,14 +57,15 @@ submap keys = do
io $ grabKeyboard d root False grabModeAsync grabModeAsync currentTime
- keyspec <- io $ allocaXEvent $ \p -> fix $ \nextkey -> do
+ (m, s) <- io $ allocaXEvent $ \p -> fix $ \nextkey -> do
maskEvent d keyPressMask p
KeyEvent { ev_keycode = code, ev_state = m } <- getEvent p
keysym <- keycodeToKeysym d code 0
if isModifierKey keysym
then nextkey
- else return (cleanMask m, keysym)
+ else return (m, keysym)
io $ ungrabKeyboard d currentTime
- whenJust (M.lookup keyspec keys) id
+ m' <- cleanMask m
+ whenJust (M.lookup (m', s) keys) id