>># 
>># 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: chckwdwevn.m,v 1.7 92/06/11 17:19:03 rws Exp $
>># 
>>#
>>TITLE XCheckWindowEvent CH08
>>ASSERTION A XCheckWindowEvent-1
A call to XCheckWindowEvent returns in event_return the
first event in the event queue that matches window w and
event_mask.
>>STRATEGY
Create a window.
Discard all events on the event queue.
Call XPutBackEvent to put events on the event queue.
Call XCheckWindowEvent.
Verify that XCheckWindowEvent returned True.
Verify the correct event-type was returned.
Verify the event contained correct window.
Verify the first matching event in event queue was returned.
>>ASSERTION - XCheckWindowEvent-2
When a call to XCheckWindowEvent finds a matching event,
then XCheckWindowEvent returns True.
>>ASSERTION A XCheckWindowEvent-3
A call to XCheckWindowEvent removes the returned event from
the event queue.
>>STRATEGY
Create a window.
Discard all events on the event queue.
Call XPutBackEvent to put events on the event queue.
Call XPending to get the current event queue size.
Call XCheckWindowEvent.
Verify that XCheckWindowEvent returned True.
Call XPending to get the current event queue size.
Verify that size of event queue has decreased by one.
>>ASSERTION - XCheckWindowEvent-4
When a matching event is not in the event queue, then a
call to XCheckWindowEvent returns in event_return the first
matching event available on the X server connection.
>>ASSERTION A XCheckWindowEvent-5
When a matching event is not in the event queue and is not
available on the X server connection, then a call to
XCheckWindowEvent returns False.
>>STRATEGY
Create a window.
Discard all events on the event queue.
Call XCheckWindowEvent.
Verify that XCheckWindowEvent returned False.
>>ASSERTION A XCheckWindowEvent-6
When a matching event is not in the event queue and is not
available on the X server connection, then a call to
XCheckWindowEvent flushes the output buffer.
>>STRATEGY
Create client2.
Discard all events on the event queue.
Create pixmap.
Create a window.
Call XCheckWindowEvent.
Verify that XCheckWindowEvent returned False.
Empty the buffer.
Ensure the server has dealt with anything flushed to it: do XSync()
Verify that the output buffer was flushed by effect on server.
