From a9d1ce1efcdff8c14b91f20cf1f2ae14022ee63f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 15 May 2011 21:03:12 +0000 Subject: [PATCH] ungrab-keyboard-before-action If an action that requires the keyboard to be grabbed (e.g., launching dmenu), it is a race when submapping the action as to whether the action will have access to the keyboard or not. To fix this, the keyboard should be ungrabbed before executing the action. --- XMonad/Actions/Submap.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XMonad/Actions/Submap.hs b/XMonad/Actions/Submap.hs index 67883264..17ab676f 100644 --- a/XMonad/Actions/Submap.hs +++ b/XMonad/Actions/Submap.hs @@ -76,6 +76,7 @@ submapDefault def keys = do else return (m, keysym) -- Remove num lock mask and Xkb group state bits m' <- cleanMask $ m .&. ((1 `shiftL` 12) - 1) - maybe def id (M.lookup (m', s) keys) io $ ungrabKeyboard d currentTime + + maybe def id (M.lookup (m', s) keys)