mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 04:01:51 -07:00
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:
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user