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


39.10 Raising and Lowering Frames

The X Window System uses a desktop metaphor. Part of this metaphor is the idea that windows are stacked in a notional third dimension perpendicular to the screen surface, and thus ordered from “highest” to “lowest”. Where two windows overlap, the one higher up covers the one underneath. Even a window at the bottom of the stack can be seen if no other window overlaps it.

A window’s place in this ordering is not fixed; in fact, users tend to change the order frequently. Raising a window means moving it “up”, to the top of the stack. Lowering a window means moving it to the bottom of the stack. This motion is in the notional third dimension only, and does not change the position of the window on the screen.

You can raise and lower SXEmacs’s X windows with these functions:

Command: raise-frame &optional frame

This function raises frame frame.

Command: lower-frame &optional frame

This function lowers frame frame.

You can also specify auto-raise (raising automatically when a frame is selected) or auto-lower (lowering automatically when it is deselected). Under X, most ICCCM-compliant window managers will have an option to do this for you, but the following variables are provided in case you’re using a broken WM.

Note: Under FSF Emacs, the same functionality is provided through the auto-raise and auto-lower frame properties.

Variable: auto-raise-frame

This variable’s value is t if frames will be raised to the top when selected.

Variable: auto-lower-frame

This variable’s value is t if frames will be lowered to the bottom when no longer selected.

Auto-raising and auto-lowering is implemented through functions attached to select-frame-hook and deselect-frame-hook (see Frame Hooks). Under normal circumstances, you should not call these functions directly.

Function: default-select-frame-hook

This hook function implements the auto-raise-frame variable; it is for use as the value of select-frame-hook.

Function: default-deselect-frame-hook

This hook function implements the auto-lower-frame variable; it is for use as the value of deselect-frame-hook.


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