Next: Workspace Hooks, Previous: X Hooks, Up: Standard Hooks
In the hooks below, focus-mode is one of the symbols
normal, grab or ungrab.
Called when the pointer enters a window (including the root window).
If the window was part of a frame, then
enter-frame-part-hookis called with three arguments: the window, the frame part class (see Frame Part Classes), and focus-mode.Otherwise
enter-notify-hookis called with two arguments: the window and focus-mode.The root window is considered to be a valid window for this hook. Sawfish will report entering the root window.
Called when the pointer leaves a window (including the root window).
If the window was part of a frame, then
leave-frame-part-hookis called with three arguments: the window, the frame part class (see Frame Part Classes), and focus-mode.Otherwise
leave-notify-hookis called with two arguments: the window and focus-mode.The root window is considered to be a valid window for this hook. Sawfish will report leaving the root window.
Called when focus gains focus. The hook functions take two arguments: the window that received focus, and focus-mode.
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 offocus-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 focus.
Called when a window loses focus. The hook functions take two arguments: the window that lost focus, and focus-mode.
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 offocus-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 focus.