Next: , Previous: Creating Frames, Up: Frames


25.6 Frame Commands

The following commands let you create, delete and operate on frames:

C-z
Iconify (“minimize”) the selected Emacs frame (iconify-or-deiconify-frame). See Exiting.
C-x 5 0
Delete the selected frame (delete-frame). This is not allowed if there is only one frame.
C-x 5 o
Select another frame, raise it, and warp the mouse to it. If you repeat this command, it cycles through all the frames on your terminal.
C-x 5 1
Delete all frames except the selected one.

To make the command C-x 5 o work properly, you should tell Emacs how the system (or the window manager) handles focus-switching between windows. There are two possibilities: either simply moving the mouse onto a window selects it (gives it focus), or you have to click on it to do so. On X, this focus policy also affects whether the focus is given to a frame that Emacs raises. Unfortunately there is no way Emacs can find out automatically which way the system handles this, so you have to explicitly say, by setting the variable focus-follows-mouse. If just moving the mouse onto a window selects it, that variable should be t; if a click is necessary, the variable should be nil. The default is t.

The window manager that is part of MS-Windows always gives focus to a frame that raises, so this variable has no effect in the native MS-Windows build of Emacs.