10.6.1 Normal Entry/Exit Events
EnterNotify
and
LeaveNotify
events are generated when the pointer moves from
one window to another window.
Normal events are identified by
XEnterWindowEvent
or
XLeaveWindowEvent
structures whose mode member is set to
NotifyNormal.
-
When the pointer moves from window A to window B and A is an inferior of B,
the X server does the following:
-
It generates a
LeaveNotify
event on window A, with the detail member of the
XLeaveWindowEvent
structure set to
NotifyAncestor.
-
It generates a
LeaveNotify
event on each window between window A and window B, exclusive,
with the detail member of each
XLeaveWindowEvent
structure set to
NotifyVirtual.
-
It generates an
EnterNotify
event on window B, with the detail member of the
XEnterWindowEvent
structure set to
NotifyInferior.
-
When the pointer moves from window A to window B and B is an inferior of A,
the X server does the following:
-
It generates a
LeaveNotify
event on window A,
with the detail member of the
XLeaveWindowEvent
structure set to
NotifyInferior.
-
It generates an
EnterNotify
event on each window between window A and window B, exclusive, with the
detail member of each
XEnterWindowEvent
structure set to
NotifyVirtual.
-
It generates an
EnterNotify
event on window B, with the detail member of the
XEnterWindowEvent
structure set to
NotifyAncestor.
-
When the pointer moves from window A to window B
and window C is their least common ancestor,
the X server does the following:
-
It generates a
LeaveNotify
event on window A,
with the detail member of the
XLeaveWindowEvent
structure set to
NotifyNonlinear.
-
It generates a
LeaveNotify
event on each window between window A and window C, exclusive,
with the detail member of each
XLeaveWindowEvent
structure set to
NotifyNonlinearVirtual.
-
It generates an
EnterNotify
event on each window between window C and window B, exclusive,
with the detail member of each
XEnterWindowEvent
structure set to
NotifyNonlinearVirtual.
-
It generates an
EnterNotify
event on window B, with the detail member of the
XEnterWindowEvent
structure set to
NotifyNonlinear.
-
When the pointer moves from window A to window B on different screens,
the X server does the following:
-
It generates a
LeaveNotify
event on window A,
with the detail member of the
XLeaveWindowEvent
structure set to
NotifyNonlinear.
-
If window A is not a root window,
it generates a
LeaveNotify
event on each window above window A up to and including its root,
with the detail member of each
XLeaveWindowEvent
structure set to
NotifyNonlinearVirtual.
-
If window B is not a root window,
it generates an
EnterNotify
event on each window from window B's root down to but not including
window B, with the detail member of each
XEnterWindowEvent
structure set to
NotifyNonlinearVirtual.
-
It generates an
EnterNotify
event on window B, with the detail member of the
XEnterWindowEvent
structure set to
NotifyNonlinear.
Christophe Tronche, ch@tronche.com