Previous: , Up: Frames   [Contents][Index]


39.12 Hooks for Customizing Frame Behavior

SXEmacs provides many hooks that are called at various times during a frame’s lifetime. See Hooks.

Variable: create-frame-hook

This hook is called each time a frame is created. The functions are called with one argument, the newly-created frame.

Variable: delete-frame-hook

This hook is called each time a frame is deleted. The functions are called with one argument, the about-to-be-deleted frame.

Variable: select-frame-hook

This is a normal hook that is run just after a frame is selected. The function default-select-frame-hook, which implements auto-raising (see Raising and Lowering), is normally attached to this hook.

Note that calling select-frame does not necessarily set the focus: The actual window-system focus will not be changed until the next time that SXEmacs is waiting for an event, and even then, the window manager may refuse the focus-change request.

Variable: deselect-frame-hook

This is a normal hook that is run just before a frame is deselected (and another frame is selected). The function default-deselect-frame-hook, which implements auto-lowering (see Raising and Lowering), is normally attached to this hook.

Variable: map-frame-hook

This hook is called each time a frame is mapped (i.e. made visible). The functions are called with one argument, the newly mapped frame.

Variable: unmap-frame-hook

This hook is called each time a frame is unmapped (i.e. made invisible or iconified). The functions are called with one argument, the newly unmapped frame.