Called when the pointer enters or leaves a window, respectively.
If the window was part of a frame, then
leave-frame-part-hook is called with three arguments: the
window, the frame part class (see Frame Part Classes), and
mode. mode is one of the symbols
called with two arguments: the window and mode.
Entering the root window is reported, too. In that case, the
root is returned in place of a window object.
Called when a window gains or loses focus, respectively. The hook
function receives two arguments: the window that received / lost
focus, and mode. mode is one of the symbols
focus-mode is set to
enter-exit, your window
focus is tightly bound to your pointer position; focus-related hooks
and enter/leave hooks will be called in lockstep. For other values of
focus-mode, Sawfish will trigger fewer focus-related hook calls
than enter/leave hook calls.
This hook is never called for the root window, because the root window never gets nor loses focus.