>># 
>># 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: entrntfy.m,v 1.18 92/06/11 17:20:38 rws Exp $
>># 
>>#
>>TITLE EnterNotify CH08
>>ASSERTION A EnterNotify-1
When an EnterNotify event is generated by a hierarchy
change, then the EnterNotify event is delivered after any
hierarchy event.
>>STRATEGY
Create client2.
Create window1.
Create window2 on top of window1.
Select for EnterNotify events on window1.
Select for EnterNotify events on window1 with client2.
Select for UnmapNotify events on window2.
Move pointer to window2.
Call XUnmapWindow on window2.
Verify that UnmapNotify event was received on window2.
Verify that EnterNotify event was received on window1.
Verify that EnterNotify event was received on window1 by client2.
Verify that pointer has remained where it was moved.
>>ASSERTION - EnterNotify-2
When an EnterNotify event is generated, then all clients
having set EnterWindowMask event mask bits on the event
window are delivered an EnterNotify event.
>>ASSERTION A EnterNotify-3
When an EnterNotify event is generated, then clients not
having set EnterWindowMask event mask bits on the event
window are not delivered an EnterNotify event.
>>STRATEGY
Create client2.
Create window.
Move pointer outside of window.
Select for EnterNotify events on window.
Select for no events on window with client2.
Warp pointer to window.
Verify that a single EnterNotify event was received.
Verify that no events were received by client2.
>>ASSERTION A EnterNotify-4
When an EnterNotify event is delivered and the child of the
event window contains the final pointer position, then
subwindow is set to that child.
>>STRATEGY
Build window hierarchy.
Create the hierarchy.
Move pointer to outside of window.
Select no events on the sourcew.
Set EnterWindowMask event mask bits on the eventw.
Move pointer to child of event window.
Verify that a EnterNotify event was received.
Verify that subwindow is set to the source window.
>>ASSERTION - EnterNotify-5
When an EnterNotify event is delivered and the child of the
event window does not contain the final pointer position,
then subwindow is set to None.
>>ASSERTION - EnterNotify-6
All EnterNotify events are delivered after any related
LeaveNotify are delivered.
>>ASSERTION A EnterNotify-7
When the pointer moves from window A to window B and A is
an inferior of B, then an EnterNotify event is generated on
window B with detail set to NotifyInferior.
>>STRATEGY
Build window hierarchy.
Move pointer to known location.
Set window B.
Set window A to child of window B.
Select for EnterNotify and LeaveNotify events on windows A and B.
Move pointer from window A to window B.
Verify EnterNotify event received on window B.
Verify that detail is set to NotifyInferior.
Verify that all EnterNotify events are delivered after all
LeaveNotify events.
>>ASSERTION A EnterNotify-8
When the pointer moves from window A to window B and B is
an inferior of A, then an EnterNotify event is generated
once on each window between window A and window B,
exclusive, in window hierarchy order, with detail set to
NotifyVirtual and then on window B with detail set to
NotifyAncestor.
>>STRATEGY
Create client.
Build window hierarchy.
Move pointer to known location.
Set window A.
Set window B to inferior of window A.
Select for EnterNotify and LeaveNotify events on all windows.
Move pointer from window A to window B.
Verify events delivered, between window A and window B, exclusive,
in proper order.
Verify that detail is set to NotifyVirtual.
Verify that event delivered to window B with detail set to NotifyAncestor.
Verify that all EnterNotify events are delivered after all
LeaveNotify events.
>>ASSERTION A EnterNotify-9
When the pointer moves from window A to window B and there
exists a window C that is their least common ancestor, then
an EnterNotify event is generated once on each window
between window C and window B, exclusive, with detail set to
NotifyNonlinearVirtual and then on window B with detail set
to NotifyNonlinear.
>>STRATEGY
Create client.
Build window hierarchy.
Move pointer to known location.
Set windows A, B, and C.
Select for EnterNotify and LeaveNotify events on all windows.
Move pointer from window A to window B.
Verify events delivered, between window C and window B, exclusive,
in proper order.
Verify that detail is set to NotifyNonlinearVirtual.
Verify that event delivered to window B with detail set to NotifyNonlinear.
Verify that all EnterNotify events are delivered after all
LeaveNotify events.
>>ASSERTION A EnterNotify-10
If the implementation supports multiple screens: When the
pointer moves from window A to window B and window A and
window B are on different screens and window B is not a root
window, then an EnterNotify event is generated on each
window from window B's root down to but not including window
B with detail set to NotifyNonlinearVirtual and then on
window B with detail set to NotifyNonlinear.
>>STRATEGY
Check to see if multiple screens are supported.
Build window hierarchy.
Move pointer to known location.
Select for EnterNotify and LeaveNotify events between windows B and
B's root window.
Move pointer from window A to window B.
Verify events delivered on each window from window B's root
down to but not including window B in proper order.
Verify that detail is set to NotifyNonlinearVirtual.
Verify that event delivered to window B with detail set to NotifyNonlinear.
Verify that all EnterNotify events are delivered after all
LeaveNotify events.
>>ASSERTION - EnterNotify-11
If the implementation supports multiple screens: When the
pointer moves from window A to window B and window A and
window B are on different screens, then an EnterNotify event
is generated on window B with detail set to NotifyNonlinear.
>>ASSERTION A EnterNotify-12
When an EnterNotify event is delivered and the event window
is the focus window, then focus is set to True.
>>STRATEGY
Build window hierarchy.
Set input focus to eventw.
Move pointer to known location.
Select EnterNotify events on the eventw.
Call XWarpPointer to move the pointer to eventw.
Verify event was delivered with focus set to True.
Move pointer back to known location.
Clear event expectations.
Set input focus to known window.
Call XWarpPointer to move the pointer to eventw.
Verify event was delivered with focus set to False.
>>ASSERTION A EnterNotify-13
When an EnterNotify event is delivered and the event window
is an inferior of the focus window, then focus is set to
True.
>>STRATEGY
Build window hierarchy.
Set input focus to ancestor of window eventw.
Move pointer to known location.
Select EnterNotify events on the eventw.
Call XWarpPointer to move the pointer to eventw.
Verify event was delivered with focus set to True.
