>># 
>># 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: ungrbkybrd.m,v 1.7 92/06/11 17:17:19 rws Exp $
>># 
>>#
>>TITLE XUngrabKeyboard CH07
>>ASSERTION B XUngrabKeyboard-1
When the client has actively grabbed the keyboard, then a
call to XUngrabKeyboard releases the keyboard and any queued
events.
>>STRATEGY
Create grab window.
Grab and freeze keyboard.
If no extensions:
  Touch test XUngrabKeyboard.
else
  Press and release key.
  Call XUngrabKeyboard.
  Verify that events are released.
  Create new window.
  Verify that keyboard events can be received on it.
>>ASSERTION A XUngrabKeyboard-2
When the specified time is earlier than the
last-keyboard-grab time or is later than the current X
server time, then a call to XUngrabKeyboard does not release
the keyboard and any queued events.
>>STRATEGY
Get current time.
Grab keyboard and freeze pointer with this time.
Call XUngrabKeyboard with earlier time.
Verify that pointer is still frozen and therefore keyboard grab is not released.

Get current time and add several seconds to get future time.
Call XUngrabKeyboard with this time.
Verify that pointer is still frozen and therefore keyboard grab is not released.
>>ASSERTION A XUngrabKeyboard-3
A call to XUngrabKeyboard generates FocusIn and FocusOut
events as though the focus were to change from the grab
window to the current focus window.
>>STRATEGY
Create grab window.
Create a focus window and set focus to that window.
Grab keyboard.
Enable events on windows.
Call XUngrabKeyboard to release keyboard.
Verify that FocusIn and FocusOut events are received.
