Node: Pointer Motion Hooks, Next: , Previous: X Hooks, Up: Standard Hooks



Pointer Motion Hooks

In the hooks below, focus-mode is one of the symbols normal, grab or ungrab.

enter-notify-hook Window Hook
enter-frame-part-hook Window Hook
Called when the pointer enters a window (including the root window).

If the window was part of a frame, then enter-frame-part-hook is called with three arguments: the window, the frame part class (see Frame Part Classes), and focus-mode.

Otherwise enter-notify-hook is 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.

leave-notify-hook Window Hook
leave-frame-part-hook Window Hook
Called when the pointer leaves a window (including the root window).

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 focus-mode.

Otherwise leave-notify-hook is 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.

focus-in-hook Window Hook
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 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 focus.

focus-out-hook Window Hook
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 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 focus.