>># 
>># 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: chngactvpn.m,v 1.6 92/06/11 17:11:34 rws Exp $
>># 
>>#      SCCS:  @(#)  ECur.mc Rel 1.8	    (2/21/92)
>>#      SCCS:  @(#)  EVal.mc Rel 1.5	    (10/10/91)
>>#
>>TITLE XChangeActivePointerGrab CH07
>>ASSERTION A XChangeActivePointerGrab-1
When the pointer is actively grabbed by the client and the
specified time is not earlier than the last-pointer-grab
time nor later than the current X server time, then a call
to XChangeActivePointerGrab changes the specified dynamic
parameters.
>>STRATEGY
Create grab_window.
Grab pointer with XGrabPointer using an event_mask of EnterWindowMask.
Check that just enter events are reported.
Call XChangeActivePointerGrab to change event_mask to PointerMotionMask.
Verify that now only motion events are reported.
>>ASSERTION A XChangeActivePointerGrab-2
When the specified time is earlier than the
last-pointer-grab time or later than the current X server
time, then a call to XChangeActivePointerGrab does not
change the parameters.
>>STRATEGY
Create grab_window.
Grab pointer with XGrabPointer using an event_mask of EnterWindowMask.
Use event_mask of PointerMotionMask.
Call XChangeActivePointerGrab with time earlier that last pointer grab time.
Verify that enter events are still being reported.

Call XChangeActivePointerGrab with time later than current X server time.
Verify that enter events are still being reported.
>>ASSERTION B XChangeActivePointerGrab-3
A call to XChangeActivePointerGrab has no effect on the
passive parameters of the function XGrabButton.
>>STRATEGY
Create and map a window.
Create and map another window (curwin) and attach a non-default
  cursor (cur) to it.
Select for no events on the window.
Set a passive grab with XGrabButton on that window with owner_events = False,
  cursor = None and event_mask = 0.
Clear event queue.
Warp the pointer into the window and around inside it.
Check no events received.
Call XChangeActivePointerGrab with event_mask = PointerMotionMask and cursor = cur.
Clear event queue.
Warp the pointer into the window and around inside it.
Check no events received.
If extension available:
  Activate grab with simulated button press in window.
  Check grab activated.
  Warp pointer around in window.
  Check no events received.
  Check cursor is not equal to that of curwin.
  Call XChangeActivePointerGrab with event_mask = PointerMotionMask and cursor = cur.
  Warp pointer around in window.
  Check MotionNotify events received.
  Check cursor is now equal to that of curwin.
  Release all buttons, hence grab.
else
  Issue message and report untested.
>>ASSERTION A XChangeActivePointerGrab-4
When a cursor argument does not name a valid Cursor, then a
BadCursor error occurs.
>>STRATEGY
Create cursor with shape XT_FONTCURSOR_GOOD in font cursor.
Free cursor.
Call test function using bad cursor as the cursor argument.
Verify that a BadCursor error occurs.
>>ASSERTION A XChangeActivePointerGrab-5
When the value of event_mask is not a bitwise combination
of ButtonPressMask, ButtonReleaseMask, EnterWindowMask,
LeaveWindowMask, PointerMotionMask, PointerMotionHintMask,
Button1MotionMask, Button2MotionMask, Button3MotionMask,
Button4MotionMask, Button5MotionMask, ButtonMotionMask or
KeymapStateMask, 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.
