If the keyboard is frozen by an active grab of another client, it fails and returns GrabFrozen. XGrabKeyboard can generate BadValue and BadWindow errors. The XUngrabKeyboard function releases the keyboard and any queued events if this client has it actively grabbed from either XGrabKeyboard or XGrabKey. It also gen erates FocusIn and FocusOut events. The X server automat ically performs an UngrabKeyboard request if the event window for an active keyboard grab becomes not viewable.
Some numeric value falls outside the range of values accepted by the request.
Unless a spe cific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error. BadWindow A value for a Window argument does not name a defined Window.