>># 
>># 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: wrppntr.m,v 1.4 92/06/11 17:17:53 rws Exp $
>># 
>>#      SCCS:  @(#)  EWin.mc Rel 1.4	    (7/19/91)
>>#
>>TITLE XWarpPointer CH07
>>ASSERTION A XWarpPointer-1
When dest_w is None, then a call to XWarpPointer moves the
pointer by the offsets dest_x, dest_y relative to the
current position of the pointer.
>>STRATEGY
Get current position of pointer.
Set dest_w to None.
Call XWarpPointer.
Verify that new position is offset from old by dest_x, dest_y.
>>ASSERTION A XWarpPointer-2
When dest_w is a window and src_w is None, then a call to
XWarpPointer moves the pointer to the offsets dest_x,
dest_y relative to the origin of dest_w.
>>STRATEGY
Create window for dest_w.
Set src_w to None.
Call XWarpPointer.
Verify that pointer is at (dest_x,dest_y) from origin of dest_w.
>>ASSERTION A XWarpPointer-3
When dest_w and src_w are windows and the pointer is within
the specified rectangle of src_w, then a call to
XWarpPointer moves the pointer to the offsets dest_x,
dest_y relative to the origin of dest_w.
>>STRATEGY
Create window dest_w.
Create window src_w.
Move pointer to within the specified rectange of src_w.
Call XWarpPointer.
Verify that pointer moves to offset (dest_x, dest_y) from origin of dest_w.
>>ASSERTION A XWarpPointer-4
When dest_w and src_w are windows and the pointer is not
within the specified rectangle of src_w, then a call to
XWarpPointer does not move the pointer.
>>STRATEGY
Create window dest_w.
Create window src_w.
Move pointer outside the specified rectange of src_w.
Call XWarpPointer.
Verify that the pointer is not moved.
>>ASSERTION A XWarpPointer-5
When src_height is zero, then it is replaced with the
current height of src_w minus src_y.
>>STRATEGY
Create window src_w.
Create window dest_w.
Set src_height to 0.
Position pointer in src_w such that it is inside source rectangle.
Call XWarpPointer.
Verify that pointer is moved.
>>ASSERTION A XWarpPointer-6
When src_width is zero, then it is replaced with the
current width of src_w minus src_x.
>>STRATEGY
Create window src_w.
Create window dest_w.
Set src_width to 0.
Position pointer in src_w such that it is inside source rectangle.
Call XWarpPointer.
Verify that pointer is moved.
>>ASSERTION A XWarpPointer-7
A call to XWarpPointer generates events as though the
pointer position had been instantaneously moved by the user.
>>STRATEGY
Create dest_w.
Position pointer at 0,0 in dest_w.
Enable events.
Call XWarpPointer to move pointer within window.
Verify that only one motion event is generated.
>>ASSERTION A XWarpPointer-8
When an active pointer grab is in progress and the pointer
is within the confine_to window, then a call to XWarpPointer
will only move the pointer as far as the closest edge of the
confine_to window.
>>STRATEGY
Create confine_to window.
Create dest_w window.
Call XGrabPointer to actively grab the pointer with confine_to set.
Attempt to move pointer into dest_w window with XWarpPointer.
Verify that pointer is still within the confine_to window.
>>ASSERTION A XWarpPointer-9
When a window argument does not name a valid Window or None,
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.
