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

10.5 Frame Types

In order to visually differentiate between different types of windows, several predefined types of window frame exist.

Function: window-type window

Returns a symbol naming the frame type currently associated with window.

These frame types currently include the following:


The normal frame type. Includes all decorations, both borders and the title bar.


The frame for a transient window. This usually does not include a title bar, but does have all four borders.


Shaped windows are normally decorated with only a title-bar, since their boundary is not rectangular it makes no sense to surround them with a rectangular border.


A combination of the shaped and transient types, normally just a very small title border with no text.


A shaded window (normally just the title bar).


A shaded transient window.


No frame at all, just the client window itself. The predefined nil-frame variable contains a null frame that may be used for this frame type.

Function: define-frame-type-mapper fun

Function fun maps from {window, frame-type} to frame-type.

Each time we want to determine a window’s frame-type (shaded, transient, etc.), we calculate an initial frame type with window-type and run the results through each frame type mapper in sequence (most recent to oldest). The frame type returned from the final mapper function is “the” frame type.

This sequence of mappers allows us to override window frame types based on window properties. For example, any shaded window has to have shaded or shaded-transient type, regardless of what its normal type is.

Function: window-type-add-border type
Function: window-type-add-title type
Function: window-type-remove-border type
Function: window-type-remove-title type

Given a window type of type, return the closest matching window type with the given property change. For example:

(window-type-add-title 'unframed)
⇒ 'shaped

This is because shaped windows normally have title bars but not borders, while unframed windows normally have neither.

Function: frame-type-menu window

Returns a list of frame types, suitable for use by the graphical customizer. The frame type of window is automatically checked.

We provide a function to simplify monitoring of window changes to certain window states. This monitoring runs on top of the window-state-change-hook.

Function: call-after-state-changed states fun

Arrange for function fun to be called with arguments ‘(window changed-states)’ when one of the states defined by the list of symbols states has been changed. States may also be a single symbol.

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