>># 
>># Copyright 1990, 1991 by the Massachusetts Institute of Technology and
>># UniSoft Group Limited.
>># 
>># Permission to use, copy, modify, distribute, and sell this software and
>># its documentation for any purpose is hereby granted without fee,
>># provided that the above copyright notice appear in all copies and that
>># both that copyright notice and this permission notice appear in
>># supporting documentation, and that the names of MIT and UniSoft not be
>># used in advertising or publicity pertaining to distribution of the
>># software without specific, written prior permission.  MIT and UniSoft
>># make no representations about the suitability of this software for any
>># purpose.  It is provided "as is" without express or implied warranty.
>># 
>># $XConsortium: ungrbky.m,v 1.9 92/06/11 17:17:10 rws Exp $
>># 
>>#      SCCS:  @(#)  EVal.mc Rel 1.5	    (10/10/91)
>>#      SCCS:  @(#)  EWin.mc Rel 1.4	    (7/19/91)
>>#
>>TITLE XUngrabKey CH07
>>ASSERTION B XUngrabKey-1
When the specified key/modifier combination has been
grabbed by this client, then a call to XUngrabKey releases
the grab.
>>STRATEGY
If extension available:
  Setup up grab on specified key/modifier combination using XGrabKey.
  Activate grab.
  Check keyboard grabbed.
  Deactivate grab.
  Check keyboard not grabbed.
  Call XUngrabKey to release grab.
  Attempt to reactivate Grab.
  Check keyboard still not grabbed.
  Release keys.
else
  Grab key.
  Touch test.
  Report untested.
>>ASSERTION B XUngrabKey-2
A modifiers argument of AnyModifier releases all grabs by
this client for the specified key and all possible modifier
combinations.
>>STRATEGY
If extensions are available:
  Place passive grab with a bunch of modifier keys.
  Activate grab.
  Check keyboard grabbed.
  Deactivate grab.
  Check keyboard not grabbed.
  Call XUngrabKey with a modifiers of AnyModifier.
  Attempt to reactivate Grab.
  Check keyboard still not grabbed.
  Release keys.

  Place passive grab with just keycode (no modifiers).
  Activate grab.
  Check keyboard grabbed.
  Deactivate grab.
  Check keyboard not grabbed.
  Call XUngrabKey with a modifiers of AnyModifier.
  Attempt to reactivate Grab.
  Check keyboard still not grabbed.
  Release keys.
else
  Report untested.
>>ASSERTION B XUngrabKey-3
A keycode argument of AnyKey releases all grabs by this
client for the specified modifiers and all keys.
>>STRATEGY
If extensions are available:
  Place passive grab with a bunch of modifier keys and given keycode.
  Activate grab.
  Check keyboard grabbed.
  Deactivate grab.
  Check keyboard not grabbed.
  Call XUngrabKey with a keycode of AnyKey.
  Attempt to reactivate Grab.
  Check keyboard still not grabbed.
  Release keys.
  Repeat for all keycodes in the range min_keycode to max_keycode
	except for those in the modifier bunch.

else
  Report untested.
>>ASSERTION B XUngrabKey-4
A call to XUngrabKey has no effect on an active grab.
>>STRATEGY
If extension available:
  Set passive grab.
  Activate it.
  Check keyboard is grabbed.
  Call XUngrabKey to attempt to release grab.
  Check keyboard still grabbed.
  Release keys to release grab.
  If still grabbed:
    Delete with message.
  else
    Call XUngrabKey to attempt to release grab.
    Attempt to activate grab.
    Check keyboard still not grabbed.
  Release keys.
else
  Report untested.
>>ASSERTION A XUngrabKey-5
When the specified keycode is not in the range specified by
min_keycode and max_keycode in the connection setup or
AnyKey, then a BadValue error occurs.
>>STRATEGY
Get min and max keycodes.
Attempt to grab key less than the minimum.
Verify that a BadValue error occurs.
If the maximum is less than 255
  Attempt to grab key greater than the maximum
  Verify a BadValue error occurs.
>>ASSERTION A XUngrabKey-6
When the value of modifiers is not a bitwise combination of
ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask,
Mod3Mask, Mod4Mask, Mod5Mask or AnyModifier, then a
BadValue error occurs.
>>STRATEGY
Obtain a sequence of values which are not in the list specified by VALUE_LIST.
For each value:
  Call test function with this value in the VALUE_ARG argument.
  Verify that a BadValue error occurs.
>>ASSERTION A XUngrabKey-7
When a window argument does not name a valid Window, then a
BadWindow error occurs.
>>STRATEGY
Create a bad window by creating and destroying a window.
Call test function using bad window as the window argument.
Verify that a BadWindow error occurs.
