summaryrefslogtreecommitdiffstats
path: root/XMonad/Stockholm/Submap.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Stockholm/Submap.hs')
-rw-r--r--XMonad/Stockholm/Submap.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/XMonad/Stockholm/Submap.hs b/XMonad/Stockholm/Submap.hs
index 8648e6c..601afba 100644
--- a/XMonad/Stockholm/Submap.hs
+++ b/XMonad/Stockholm/Submap.hs
@@ -12,8 +12,8 @@ import XMonad hiding (keys)
-- | Like 'XMonad.Actions.Submap.submapDefault', but provides the looked up string to the default action.
submapString :: (String -> X ()) -> M.Map (KeyMask, KeySym) (X ()) -> X ()
-submapString def keys = do
- XConf { theRoot = root, display = d } <- ask
+submapString defAction keys = do
+ XConf { display = d } <- ask
(m, s, str) <- io $ allocaXEvent $ \p -> fix $ \nextkey -> do
maskEvent d keyPressMask p
@@ -22,10 +22,10 @@ submapString def keys = do
if isModifierKey keysym
then nextkey
else do
- (mbKeysym, str) <- lookupString (asKeyEvent p)
+ (_, str) <- lookupString (asKeyEvent p)
return (m, keysym, str)
-- Remove num lock mask and Xkb group state bits
m' <- cleanMask $ m .&. ((1 `shiftL` 12) - 1)
- maybe (def str) id (M.lookup (m', s) keys)
+ maybe (defAction str) id (M.lookup (m', s) keys)