xmonad-contrib-0.18.1.9: Community-maintained extensions for xmonad
Copyright(c) 2016 Brandon S Allbery
LicenseBSD-style (see xmonad/LICENSE)
Maintainerallbery.b@gmail.com
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Util.Ungrab

Contents

Description

Deprecated: Use XMonad.Operations.unGrab instead

Allow releasing xmonad's keyboard grab

Synopsis

Usage:

unGrab :: X () #

Release XMonad's keyboard grab, so other grabbers can do their thing.

Start a keyboard action with this if it is going to run something that needs to do a keyboard, pointer, or server grab. For example,

, ((modm .|. controlMask, xK_p), unGrab >> spawn "scrot")

(Other examples are certain screen lockers and "gksu".) This avoids needing to insert a pause/sleep before running the command.

XMonad retains the keyboard grab during key actions because if they use a submap, they need the keyboard to be grabbed, and if they had to assert their own grab then the asynchronous nature of X11 allows race conditions between XMonad, other clients, and the X server that would cause keys to sometimes be "leaked" to the focused window.