Next: , Previous: , Up: Standard Hooks   [Contents][Index]


22.9 Pointer Motion Hooks

Window Hook: enter-notify-hook
Window Hook: enter-frame-part-hook
Window Hook: leave-notify-hook
Window Hook: leave-frame-part-hook

Called when the pointer enters or leaves a window, respectively.

If the window was part of a frame, then enter-frame-part-hook or 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 normal, grab or ungrab.

Otherwise enter-notify-hook or leave-notify-hook is called with two arguments: the window and mode.

Entering the root window is reported, too. In that case, the symbol root is returned in place of a window object.

Window Hook: focus-in-hook
Window Hook: focus-out-hook

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 normal, grab, ungrab or while-grabbed.

If your 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.