From 675e2b70b16fdc4151bc2ec8b8953804bdd428b6 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 15 May 2011 23:03:12 +0200 Subject: ungrab-keyboard-before-action Ignore-this: 5b8f3c286e8231a4d7ade2acbb2ae84a 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. darcs-hash:20110515210312-24e3f-42b3c50a280ec90bec11cb48b57152d062c33b01.gz --- XMonad/Actions/Submap.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'XMonad/Actions') diff --git a/XMonad/Actions/Submap.hs b/XMonad/Actions/Submap.hs index 6788326..17ab676 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) -- cgit v1.2.3