Merge pull request #586 from liskin/submap-sync

X.A.Submap, X.U.Ungrab: Sync after ungrab (fixes issues with runProcessWithInput)
This commit is contained in:
Tomáš Janoušek
2021-08-09 10:12:44 +01:00
committed by GitHub
3 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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)