index
Xfocus
http://www.ac3.edu.au/SGI_Developer/books/XLib_PG/sgi_html/ch09.html
Normal focus events are identified by XFocusInEvent or XFocusOutEvent structures whose mode member is
set to NotifyNormal. Focus events while grabbed are identified by XFocusInEvent or XFocusOutEvent structures whose mode member is set to NotifyWhileGrabbed. The X server processes normal
focus and focus events while grabbed according to the following:
- It generates a FocusOut event on window A, with the detail member of the XFocusOutEvent structure set to NotifyAncestor.
- It generates a FocusOut event on each window between window A and window B, exclusive, with the detail member of each XFocusOutEvent structure set to NotifyVirtual.
- It generates a FocusIn event on window B, with the detail member of the XFocusInEvent structure set
to NotifyInferior.
- If window P is an inferior of window B but window P is not window A or an inferior or ancestor of window A, it generates a FocusIn event on each window below window B, down to and including window P, with the detail member of each XFocusIn Event structure set to NotifyPointer.
When the focus moves from window A to window B, B is an inferior of A, and the pointer is in window P, the X server does the following:
- If window P is an inferior of window A but P is not an inferior of window B or an ancestor of B, it generates a FocusOut
event on each window from window P up to but not including window A, with the detail member of each XFocusOutEvent structure set
to NotifyPointer.
- It generates a FocusOut event on window A, with the detail member of the XFocusOutEvent structure
set to NotifyInferior.
- It generates a FocusIn event on each window between window A and window B, exclusive, with the detail member of each XFocusInEvent structure set to NotifyVirtual.
- It generates a FocusIn event on window B, with the detail member of the XFocusInEvent structure set
to NotifyAncestor.
- If window P is an inferior of window A, it generates a FocusOut event on each window from window P
up to but not including window A, with the detail member of the XFocusOutEvent structure set to NotifyPointer.
- It generates a FocusOut event on window A, with the detail member of the XFocusOutEvent structure
set to NotifyNonlinear.
- It generates a FocusOut event on each window between window A and window C, exclusive, with the detail member of each XFocusOutEvent structure set to NotifyNonlinearVirtual.
- It generates a FocusIn event on each window between C and B, exclusive, with the detail member of each XFocusInEvent structure set to NotifyNonlinearVirtual.
- It generates a FocusIn event on window B, with the detail member of the XFocusInEvent structure set
to NotifyNonlinear.
- If window P is an inferior of window B, it generates a FocusIn event on each window below window B down
to and including window P, with the detail member of the XFocusInEvent structure set to NotifyPointer.
- If window P is an inferior of window A, it generates a FocusOut event on each window from window P up to but not including
window A, with the detail member of each XFocusOutEvent structure set to NotifyPointer.
- It generates a FocusOut event on window A, with the detail member of the XFocusOutEvent structure
set to NotifyNonlinear.
- If window A is not a root window, it generates a FocusOut event on each window above window A up to and including its root,
with the detail member of each XFocusOutEvent structure set to NotifyNonlinearVirtual.
- If window B is not a root window, it generates a FocusIn event on each window from window B's root down to but not including
window B, with the detail member of each XFocusInEvent structure set to NotifyNonlinearVirtual.
- It generates a FocusIn event on window B, with the detail member of each XFocusInEvent structure set
to NotifyNonlinear.
- If window P is an inferior of window B, it generates a FocusIn event on each window below window B down to and including
window P, with the detail member of each XFocusInEvent structure set to NotifyPointer.
A -> PointerRoot / None (P)
- If window P is an inferior of window A, it generates a FocusOut event on each window from window P up to but not including
window A, with the detail member of each XFocusOutEvent structure set to NotifyPointer.
- It generates a FocusOut event on window A, with the detail member of the XFocusOutEvent structure
set to NotifyNonlinear.
- If window A is not a root window, it generates a FocusOut event on each window above window A up to and including its root,
with the detail member of each XFocusOutEvent structure set to NotifyNonlinearVirtual.
- It generates a FocusIn event on the root window of all screens, with the detail member of each XFocusInEvent structure set to NotifyPointerRoot (or NotifyDetailNone).
- If the new focus is PointerRoot, it generates a FocusIn event on each window from window P's root
down to and including window P, with the detail member of each XFocusInEvent structure set to NotifyPointer.
PointerRoot / None -> A (P)
- If the old focus is PointerRoot, it generates a FocusOut event on each window from window P up to and
including window P's root, with the detail member of each XFocusOutEvent structure set to NotifyPointer.
- It generates a FocusOut event on all root windows, with the detail member of each XFocusOutEvent
structure set to NotifyPointerRoot (or NotifyDetailNone).
- If window A is not a root window, it generates a FocusIn event on each window from window A's root down
to but not including window A, with the detail member of each XFocusInEvent structure set to
NotifyNonlinearVirtual.
- It generates a FocusIn event on window A, with the detail member of the XFocusInEvent structure set to
NotifyNonlinear.
- If window P is an inferior of window A, it generates a FocusIn event on each window below window A down to and including
window P, with the detail member of each XFocusInEvent structure set to NotifyPointer.
PointerRoot -> None (P)
- If the old focus is PointerRoot, it generates a FocusOut event on each window from window P up to
and including window P's root, with the detail member of each XFocusOutEvent structure set to NotifyPointer.
- It generates a FocusOut event on all root windows, with the detail member of each XFocusOutEvent
structure set to either NotifyPointerRoot or NotifyDetailNone.
- It generates a FocusIn event on all root windows, with the detail member of each XFocusInEvent
structure set to NotifyDetailNone or NotifyPointerRoot.
- If the new focus is PointerRoot, it generates a FocusIn event on each window from window P's root
down to and including window P, with the detail member of each XFocusInEvent structure set to NotifyPointer.