diff --git a/CHANGES.md b/CHANGES.md index c5e2e4a5..87cbf400 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -681,6 +681,11 @@ - Added `swapWithCurrent` and `swapOrder` to the list of exported names. + - `XMonad.Actions.Submap`, `XMonad.Util.Ungrab`: + + - Fixed issue with keyboard/pointer staying grabbed when a blocking action + like `runProcessWithInput` was invoked. + ## 0.16 ### Breaking Changes diff --git a/XMonad/Actions/Submap.hs b/XMonad/Actions/Submap.hs index e360b0ff..52372cd2 100644 --- a/XMonad/Actions/Submap.hs +++ b/XMonad/Actions/Submap.hs @@ -92,5 +92,6 @@ submapDefaultWithKey defAction keys = do io $ ungrabPointer d currentTime io $ ungrabKeyboard d currentTime + io $ sync d False fromMaybe (defAction (m', s)) (M.lookup (m', s) keys) diff --git a/XMonad/Util/Ungrab.hs b/XMonad/Util/Ungrab.hs index 5ad4db56..e11f6630 100644 --- a/XMonad/Util/Ungrab.hs +++ b/XMonad/Util/Ungrab.hs @@ -18,6 +18,7 @@ module XMonad.Util.Ungrab unGrab ) where +import Graphics.X11.Xlib (sync) import Graphics.X11.Xlib.Extras (currentTime) import Graphics.X11.Xlib.Misc (ungrabKeyboard, ungrabPointer) import XMonad.Core @@ -40,4 +41,4 @@ import XMonad.Core -- | Release xmonad's keyboard grab, so other grabbers can do their thing. unGrab :: X () -unGrab = withDisplay $ \d -> io (ungrabKeyboard d currentTime >> ungrabPointer d currentTime) +unGrab = withDisplay $ \d -> io (ungrabKeyboard d currentTime >> ungrabPointer d currentTime >> sync d False)