>># 
>># 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: fcsin.m,v 1.11 92/06/11 17:21:02 rws Exp $
>># 
>>#
>>TITLE FocusIn CH08
>>ASSERTION A FocusIn-1
When a FocusIn event is generated, then all clients having
set FocusChangeMask event mask bits on the event window are
delivered a FocusIn event.
>>STRATEGY
Create client.
Create clients client2 and client3.
Create window.
Move pointer to known location.
Select for FocusIn events on window.
Select for FocusIn events on window with client2.
Select for no events on window with client3.
Generate FocusIn event by changing focus to window.
Verify that FocusIn event was delivered.
Verify members in delivered FocusIn event structure.
Verify that FocusIn event was delivered to client2.
Verify members in delivered FocusIn event structure.
Verify that no events were delivered to client3.
>>ASSERTION - FocusIn-2
When a FocusIn event is generated, then clients not having
set FocusChangeMask event mask bits on the event window are
not delivered a FocusIn event.
>>ASSERTION - FocusIn-3
All FocusIn events are delivered after any related FocusOut
are delivered.
>>ASSERTION A FocusIn-4
When the input focus moves from window A to window B and
window A is an inferior of window B and the pointer is in
window P, then a FocusIn event is generated on window B,
with detail set to NotifyInferior.
>>STRATEGY
Create client.
Build window hierarchy.
Move pointer to known location.
Set window B.
Set window A to inferior of window B.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to window B with detail set to NotifyInferior.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION A FocusIn-5
When the input focus moves from window A to window B and
window A is an inferior of window B and the pointer is in
window P and window P is an inferior of window B and window
P is not the same window as window A and window P is not an
inferior of window A and window P is not an ancestor of
window A, then, after a FocusIn event is generated on window
B with detail set to NotifyInferior, a FocusIn event is
generated on each window below window B, down to and
including window P, with detail set to NotifyPointer.
>>STRATEGY
Create client.
Build window hierarchy.
Move pointer to known location.
Set window B.
Set window A to inferior of window B.
Set window P to inferior of sibling of window A.
Move pointer to window P.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to window B with detail set to NotifyInferior.
Verify that event delivered below window B, down to and including
window P, with detail set to NotifyPointer.
Verify order of FocusIn event delivery.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION A FocusIn-6
When the input focus moves from window A to window B and
window B is an inferior of window A and the pointer is in
window P, then a FocusIn event is generated on each window
between window A and window B, exclusive, 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.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to windows between window A and window B, exclusive,
with detail set to NotifyVirtual.
Verify that event delivered to window B with detail set to NotifyAncestor.
Verify order of FocusIn event delivery.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION A FocusIn-7
When the input focus moves from window A to window B and
window C is their least common ancestor and the pointer is
in window P, then a FocusIn event is generated on each
window between C and 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 window C.
Set window B to inferior of window C.
Set window A to inferior of window C.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to windows between window C and window B, exclusive,
with detail set to NotifyNonlinearVirtual.
Verify that event delivered to window B with detail set to NotifyNonlinear.
Verify order of FocusIn event delivery.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION A FocusIn-8
When the input focus moves from window A to window B and
window C is their least common ancestor and the pointer is
in window P and window P is an inferior of window B, then,
after the related FocusIn events are generated with detail
set to NotifyNonlinearVirtual and NotifyNonlinear, a
FocusIn event is generated on each window below window B
down to and including window P, with detail set to
NotifyPointer.
>>STRATEGY
Create client.
Build window hierarchy.
Move pointer to known location.
Set window C.
Set window B to inferior of window C.
Set window P to inferior of window B.
Set window A to inferior of window C.
Move pointer to window P.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to windows between window C and window B, exclusive,
with detail set to NotifyNonlinearVirtual.
Verify that event delivered to window B with detail set to NotifyNonlinear.
Verify that events were delivered to windows below window B down to and
including window P, exclusive,
with detail set to NotifyPointer.
Verify order of FocusIn event delivery.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION C FocusIn-9
If the implementation supports multiple screens: When the
input focus moves from window A to window B and window A and
window B are not on the same screens and the pointer is in
window P and window B is not a root window, then a FocusIn
event is generated on each window from window B's root down
to but not including window B, with detail set to
NotifyNonlinearVirtual.
>>STRATEGY
Check to see if multiple screens are supported.
Create client.
Build window hierarchy on all supported screens.
Move pointer to known location.
Set window A.
Set window B to an inferior of the root window on a different screen than A.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to each window from window B's root down
to but not including window B
with detail set to NotifyNonlinearVirtual.
Verify order of FocusIn event delivery.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION C FocusIn-10
If the implementation supports multiple screens: When the
input focus moves from window A to window B and window A and
window B are not on the same screens and the pointer is in
window P, then, after any related FocusIn events are
generated with detail set to NotifyNonlinearVirtual, a
FocusIn event is generated on window B with detail set to
NotifyNonlinear.
>>STRATEGY
Check to see if multiple screens are supported.
Create client.
Build window hierarchy on all supported screens.
Move pointer to known location.
Set window A.
Set window B to an inferior of the root window on a different screen than A.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to each window from window B's root down
to but not including window B
with detail set to NotifyNonlinearVirtual.
Verify that event delivered on window B with detail
set to NotifyNonlinear.
Verify order of FocusIn event delivery.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION C FocusIn-11
If the implementation supports multiple screens: When the
input focus moves from window A to window B and window A and
window B are not on the same screens and the pointer is in
window P and window P is an inferior of window B, then a
FocusIn event is generated on window B with detail set to
NotifyNonlinear.
>>STRATEGY
Check to see if multiple screens are supported.
Create client.
Build window hierarchy on all supported screens.
Move pointer to known location.
Set window A.
Set window B.
Set P to inferior of window B.
Set input focus to window A.
Move pointer to window P.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered on window B with detail
set to NotifyNonlinear.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION C FocusIn-12
If the implementation supports multiple screens: When the
input focus moves from window A to window B and window A and
window B are not on the same screens and the pointer is in
window P and window P is an inferior of window B, then,
after the related FocusIn events are generated with detail
set to NotifyNonlinearVirtual and NotifyNonlinear, a
FocusIn event is generated on each window below window B
down to and including window P with detail set to
NotifyPointer.
>>STRATEGY
Check to see if multiple screens are supported.
Create client.
Build window hierarchy on all supported screens.
Move pointer to known location.
Set window A.
Set window B to an inferior of the root window on a different screen than A.
Set window P to an inferior of B.
Set input focus to window A.
Move pointer to window P.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to each window from window B's root down
to but not including window B
with detail set to NotifyNonlinearVirtual.
Verify that event delivered on window B with detail
set to NotifyNonlinear.
Verify that event delivered to each window from window B down
to and including window P
with detail set to NotifyPointer.
Verify order of FocusIn event delivery.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION - FocusIn-13
When the focus moves from window A to PointerRoot (events
sent to the window under the pointer) and the pointer is in
window P, then a FocusIn event is generated on the root
window of all screens, with detail set to NotifyPointerRoot.
>>ASSERTION A FocusIn-14
When the focus moves from window A to PointerRoot (events
sent to the window under the pointer) and the pointer is in
window P, then, after the related FocusIn events are
generated with detail set to NotifyPointerRoot, a FocusIn
event is generated on each window from window P's root down
to and including window P, with detail set to NotifyPointer.
>>STRATEGY
Create client.
Build window hierarchy on all supported screens.
Set window A.
Set window P.
Move pointer to window P.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to PointerRoot.
Verify that the expected events were delivered.
Verify that event delivered to the root window of all screens
with detail set to NotifyPointerRoot.
Verify that event generated on each window from window P's root down
to and including window P with detail set to NotifyPointer.
Verify that these events occurred in the correct order.
Verify that the NotifyPointerRoot events were delivered before
NotifyPointer events.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION A FocusIn-15
When the focus moves from window A to None (discard) and
the pointer is in window P, then a FocusIn event is
generated on the root window of all screens, with detail set
to NotifyDetailNone.
>>STRATEGY
Create client.
Build window hierarchy on all supported screens.
Set window A.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusIn event by changing focus from A to None.
Verify that the expected events were delivered.
Verify that event delivered to the root window of all screens
with detail set to NotifyDetailNone.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION A FocusIn-16
When the focus moves from PointerRoot (events sent to the
window under the pointer) or None (discard) to window A and
the pointer is in window P and window A is not a root
window, then a FocusIn event is generated on each window
from window A's root down to but not including window A,
with detail set to NotifyNonlinearVirtual.
>>STRATEGY
Create client.
Build window hierarchy.
Set window A.
Move pointer to known location.
Set input focus to PointerRoot.
Select for Focus events on windows.
Generate FocusIn event by changing focus from PointerRoot to A.
Verify that the expected events were delivered.
Verify that event delivered on each window from window A's root down to
but not including window A
with detail set to NotifyNonlinearVirtual.
Verify that these events occurred in the correct order.
Verify that all FocusIn events are delivered after all
FocusOut events.
Repeat with focus initially set to None.
>>ASSERTION A FocusIn-17
When the focus moves from PointerRoot (events sent to the
window under the pointer) or None (discard) to window A and
the pointer is in window P, then, after any related FocusIn
events are generated with detail set to
NotifyNonlinearVirtual, a FocusIn event is generated on
window A with detail set to NotifyNonlinear.
>>STRATEGY
Create client.
Build window hierarchy.
Set window A.
Move pointer to known location.
Set input focus to PointerRoot.
Select for Focus events on windows.
Generate FocusIn event by changing focus from PointerRoot to A.
Verify that the expected events were delivered.
Verify that event delivered on each window from window A's root down to
but not including window A
with detail set to NotifyNonlinearVirtual.
Verify that event delivered on to window A
with detail set to NotifyNonlinear.
Verify that these events occurred in the correct order.
Verify that all FocusIn events are delivered after all
FocusOut events.
Repeat with focus initially set to None.
>>ASSERTION A FocusIn-18
When the focus moves from PointerRoot (events sent to the
window under the pointer) or None (discard) to window A and
the pointer is in window P and window P is an inferior of
window A, then, after the related FocusIn events are
generated with detail set to NotifyNonlinearVirtual and
NotifyNonlinear, a FocusIn event is generated on each
window below window A down to and including window P, with
detail set to NotifyPointer.
>>STRATEGY
Create client.
Build window hierarchy.
Set window A.
Set window P.
Move pointer to window P.
Set input focus to PointerRoot.
Select for Focus events on windows.
Generate FocusIn event by changing focus from PointerRoot to A.
Verify that the expected events were delivered.
Verify that event delivered on each window from window A's root down to
but not including window A
with detail set to NotifyNonlinearVirtual.
Verify that event delivered on to window A
with detail set to NotifyNonlinear.
Verify that event delivered on each window below window A down to
and including window P
with detail set to NotifyPointer.
Verify that these events occurred in the correct order.
Verify that all FocusIn events are delivered after all
FocusOut events.
Repeat with focus initially set to None.
>>ASSERTION A FocusIn-19
When the focus moves from PointerRoot (events sent to the
window under the pointer) to None (discard) and the pointer
is in window P, then a FocusIn event is generated on the
root window of all screens, with detail set to
NotifyDetailNone.
>>STRATEGY
Create client.
Build window hierarchy on all supported screens.
Move pointer to known location.
Set input focus to PointerRoot.
Select for Focus events on windows.
Generate FocusIn event by changing focus from PointerRoot to None.
Verify that the expected events were delivered.
Verify that event delivered to the root window of all screens
with detail set to NotifyDetailNone.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION A FocusIn-20
When the focus moves from None to PointerRoot and the
pointer is in window P, then a FocusIn event is generated on
the root window of all screens, with detail set to
NotifyPointerRoot.
>>STRATEGY
Create client.
Build window hierarchy on all supported screens.
Set window P.
Move pointer to known location.
Set input focus to None.
Select for Focus events on windows.
Generate FocusIn event by changing focus from None to PointerRoot.
Verify that the expected events were delivered.
Verify that event delivered to the root window of all screens
with detail set to NotifyPointerRoot.
Verify that all FocusIn events are delivered after all
FocusOut events.
>>ASSERTION A FocusIn-21
When the focus moves from None to PointerRoot and the
pointer is in window P, then, after the related FocusIn
events are generated with detail set to NotifyPointerRoot,
a FocusIn event is generated on each window from window P's
root down to and including window P, with detail set to
NotifyPointer.
>>STRATEGY
Create client.
Build window hierarchy on all supported screens.
Set window P.
Move pointer to known location.
Set input focus to None.
Select for Focus events on windows.
Generate FocusIn event by changing focus from None to PointerRoot.
Verify that the expected events were delivered.
Verify that event delivered to the root window of all screens
with detail set to NotifyPointerRoot.
Verify that event delivered on each window from window P's root down to
and including window P
with detail set to NotifyPointer.
Verify that the NotifyPointerRoot events were delivered before
NotifyPointer events.
Verify that all FocusIn events are delivered after all
FocusOut events.
