At any time, one frame in SXEmacs is the selected frame. The selected window always resides on the selected frame. As the focus moves from device to device, the selected frame on each device is remembered and restored when the focus moves back to that device.
This function returns the selected frame on device. If device is not specified, the selected device will be used. If no frames exist on the device,
nilis returned.
The X server normally directs keyboard input to the X window that the mouse is in. Some window managers use mouse clicks or keyboard events to shift the focus to various X windows, overriding the normal behavior of the server.
Lisp programs can switch frames “temporarily” by calling
the function select-frame. This does not override the window
manager; rather, it escapes from the window manager's control until
that control is somehow reasserted.
When using a text-only terminal, there is no window manager; therefore,
select-frame is the only way to switch frames, and the effect
lasts until overridden by a subsequent call to select-frame.
Only the selected terminal frame is actually displayed on the terminal.
Each terminal screen except for the initial one has a number, and the
number of the selected frame appears in the mode line after the word
‘XEmacs’ (see Modeline Variables).
This function selects frame frame, temporarily disregarding the focus of the X server if any. The selection of frame lasts until the next time the user does something to select a different frame, or until the next time this function is called.
Note that
select-framedoes not actually cause the window-system focus to be set to this frame, or theselect-frame-hookordeselect-frame-hookto be run, until the next time that XEmacs is waiting for an event.Also note that when the variable
focus-follows-mouseis non-nil, the frame selection is temporary and is reverted when the current command terminates, much like the buffer selected byset-buffer. In order to effect a permanent focus change usefocus-frame.
This function selects frame and gives it the window system focus. The operation of
focus-frameis not affected by the value offocus-follows-mouse.