>># 
>># 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: fcsot.m,v 1.10 92/06/11 17:21:14 rws Exp $
>># 
>>#
>>TITLE FocusOut CH08
>>ASSERTION A FocusOut-1
When a FocusOut event is generated by a window unmap, then
the FocusOut event is generated after the corresponding
UnmapNotify event.
>>STRATEGY
Create client.
Create window hierarchy.
Select for FocusOut and UnmapNotify events on window.
Set focus to window.
Generate events by unmapping window.
Verify that a UnmapNotify event was delivered.
Verify that a FocusOut event was delivered.
Verify that the FocusOut event was delivered after the UnmapNotify event.
>>ASSERTION A FocusOut-2
When a FocusOut event is generated, then all clients having
set FocusChangeMask event mask bits on the event window are
delivered a FocusOut event.
>>STRATEGY
Create client.
Create clients client2 and client3.
Create window.
Select for FocusOut events on window.
Select for FocusOut events on window with client2.
Select for no events on window with client3.
Set focus to window.
Generate FocusOut event by changing focus from w to None.
Verify that FocusOut event was delivered.
Verify members in delivered FocusOut event structure.
Verify that FocusOut event was delivered to client2.
Verify members in delivered FocusOut event structure.
Verify that no events were delivered to client3.
>>ASSERTION - FocusOut-3
When a FocusOut event is generated, then clients not having
set FocusChangeMask event mask bits on the event window are
not delivered a FocusOut event.
>>ASSERTION - FocusOut-4
All FocusOut events are delivered before any related
FocusIn are delivered.
>>ASSERTION A FocusOut-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, then a FocusOut event is generated on window A,
with detail set to NotifyAncestor and then on each window
between window A and window B, exclusive, with detail set to
NotifyVirtual.
>>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 FocusOut event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to window A with detail set to NotifyAncestor.
Verify that event delivered on each window
between window A and window B, exclusive,
with detail set to NotifyVirtual.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION A FocusOut-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 and window P is an inferior of window A and window
P is not an inferior of window B and window P is not an
ancestor of window B, then a FocusOut event is generated on
each window from window P up to but not including window A,
with detail set to NotifyPointer.
>>STRATEGY
Create client.
Build window hierarchy.
Move pointer to known location.
Set window A.
Set window B to inferior of window A.
Set window P to inferior of sibling of window B.
Move pointer to window P.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to each window from window P
up to but not including window A,
with detail set to NotifyPointer.
Verify order of FocusOut event delivery.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION A FocusOut-7
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, after any related FocusOut events are
generated with detail set to NotifyPointer, a FocusOut
event is generated on window A, with detail set to
NotifyInferior.
>>STRATEGY
Create client.
Build window hierarchy.
Move pointer to known location.
Set window A.
Set window B to inferior of window A.
Set window P to inferior of sibling of window B.
Move pointer to window P.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to each window from window P
up to but not including window A,
with detail set to NotifyPointer.
Verify that event delivered on window A
with detail set to NotifyInferior.
Verify order of FocusOut event delivery.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION A FocusOut-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 A, then a
FocusOut event is generated on each window from window P up
to but not including window A, with detail set to
NotifyPointer.
>>STRATEGY
Create client.
Build window hierarchy.
Move pointer to known location.
Set window C.
Set window A to inferior of window C.
Set window P to inferior of window A.
Set window B to inferior of window C.
Move pointer to window P.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to windows from window P
up to but not including window A,
with detail set to NotifyPointer.
Verify order of FocusOut event delivery.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION A FocusOut-9
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, after any related FocusOut events are
generated with detail set to NotifyPointer, a FocusOut
event is generated on window A, with detail set to
NotifyNonlinear and then on each window between window A and
window C, exclusive, with detail set to
NotifyNonlinearVirtual.
>>STRATEGY
Create client.
Build window hierarchy.
Move pointer to known location.
Set window C.
Set window A to inferior of window C.
Set window P to inferior of window A.
Set window B to inferior of window C.
Move pointer to window P.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to windows from window P
up to but not including window A,
with detail set to NotifyPointer.
Verify that event delivered to window A
with detail set to NotifyNonlinear.
Verify that event delivered between window A and window C, exclusive,
with detail set to NotifyNonlinearVirtual.
Verify order of FocusOut event delivery.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION C FocusOut-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 and window P is an inferior of window A, then a
FocusOut event is generated on each window from window P up
to but not including window A, 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.
Move pointer to window P.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to each window from window P
up to but not including window A,
with detail set to NotifyPointer.
Verify order of FocusOut event delivery.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION C FocusOut-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, then, after any related FocusOut events are
generated with detail set to NotifyPointer, a FocusOut
event is generated on window A, 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 to a root window.
Set window B to an inferior of the root window on a different screen than A.
Set window P.
Move pointer to window P.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to each window from window P
up to but not including window A,
with detail set to NotifyPointer.
Verify that event delivered to window A
with detail set to NotifyNonlinear.
Verify order of FocusOut event delivery.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION C FocusOut-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 A is not a root window, then, after the
related FocusOut event is generated with detail set to
NotifyNonlinear, a FocusOut event is generated on each
window above window A up to and including its root, 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 to a non-root window.
Set window B to an inferior of the root window on a different screen than A.
Move pointer to window B.
Set input focus to window A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to B.
Verify that the expected events were delivered.
Verify that event delivered to window A
with detail set to NotifyNonlinear.
Verify that event delivered on each window above window A
up to and including its root,
with detail set to NotifyNonlinearVirtual.
Verify order of FocusOut event delivery.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION A FocusOut-13
When the focus moves from window A to PointerRoot (events
sent to the window under the pointer) or when the focus
moves from window A to None (discard) and the pointer is in
window P and window P is an inferior of window A, then a
FocusOut event is generated on each window from window P up
to but not including window A, with detail set to
NotifyPointer.
>>STRATEGY
Create client.
Build window hierarchy.
Set window A to a root window.
Set P to inferior of A.
Move pointer to P.
Set input focus to A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to PointerRoot.
Verify that the expected events were delivered.
Verify that event delivered on each window from window P up to
but not including window A
with detail set to NotifyPointer.
Verify that these events occurred in the correct order.
Verify that all FocusOut events are delivered before all
FocusIn events.
Repeat with final focus set to None.
>>ASSERTION A FocusOut-14
When the focus moves from window A to PointerRoot (events
sent to the window under the pointer) or when the focus
moves from window A to None (discard) and the pointer is in
window P, then, after any related FocusOut events are
generated with detail set to NotifyPointer, a FocusOut
event is generated on window A, with detail set to
NotifyNonlinear.
>>STRATEGY
Create client.
Build window hierarchy.
Set window A to a root window.
Set P to inferior of A.
Move pointer to P.
Set input focus to A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to PointerRoot.
Verify that the expected events were delivered.
Verify that event delivered on each window from window P up to
but not including window A
with detail set to NotifyPointer.
Verify that event delivered on window A
with detail set to NotifyNonlinear.
Verify that these events occurred in the correct order.
Verify that all FocusOut events are delivered before all
FocusIn events.
Repeat with final focus set to None.
>>ASSERTION A FocusOut-15
When the focus moves from window A to PointerRoot (events
sent to the window under the pointer) or when the focus
moves from window A to None (discard) and the pointer is in
window P and window A is not a root window, then, after the
related FocusOut event is generated with detail set to
NotifyNonlinear, a FocusOut event is generated on each
window above window A up to and including its root, with
detail set to NotifyNonlinearVirtual.
>>STRATEGY
Create client.
Build window hierarchy.
Set window A to a non-root window.
Set P to root window.
Move pointer to P.
Set input focus to A.
Select for Focus events on windows.
Generate FocusOut event by changing focus from A to PointerRoot.
Verify that the expected events were delivered.
Verify that event delivered on window A
with detail set to NotifyNonlinear.
Verify that event delivered on each window above window A up to
and including its root,
with detail set to NotifyNonlinearVirtual.
Verify that these events occurred in the correct order.
Verify that all FocusOut events are delivered before all
FocusIn events.
Repeat with final focus set to None.
>>ASSERTION - FocusOut-16
When the focus moves from PointerRoot (events sent to the
window under the pointer) to window A and the pointer is in
window P, then a FocusOut event is generated on each window
from window P up to and including window P's root, with
detail set to NotifyPointer.
>>ASSERTION A FocusOut-17
When the focus moves from PointerRoot (events sent to the
window under the pointer) to window A and the pointer is in
window P, then, after any related FocusOut events are
generated with detail set to NotifyPointer, a FocusOut
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 A.
Set window P.
Move pointer to window P.
Set input focus to PointerRoot.
Select for Focus events on windows.
Generate FocusOut event by changing focus from PointerRoot to A.
Verify that the expected events were delivered.
Verify that event delivered to windows above window P
up to and including window P's root,
with detail set to NotifyPointer.
Verify that event delivered to the root window of all screens
with detail set to NotifyPointerRoot.
Verify that these events are delivered after the NotifyPointer events.
Verify order of FocusOut event delivery from P to Proot.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION A FocusOut-18
When the focus moves from None (discard) to window A and
the pointer is in window P, then a FocusOut 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 P.
Move pointer to window P.
Set input focus to PointerRoot.
Select for Focus events on windows.
Generate FocusOut event by changing focus from PointerRoot to None.
Verify that the expected events were delivered.
Verify that event delivered to windows above window P
up to and including window P's root,
with detail set to NotifyPointer.
Verify that event delivered to the root window of all screens
with detail set to NotifyPointerRoot.
Verify that these events are delivered after the NotifyPointer events.
Verify order of FocusOut event delivery from P to Proot.
Verify that all FocusOut events are delivered before all
FocusIn events.
>>ASSERTION A FocusOut-19
When the focus moves from None to PointerRoot and the
pointer is in window P, then a FocusOut 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 None.
Select for Focus events on windows.
Generate FocusOut 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 NotifyDetailNone.
Verify that all FocusOut events are delivered before all
FocusIn events.
