Next: , Up: RandR and Xinerama   [Contents][Index]


13.1 Multi-head Environment

Functions which provide information on monitor geometries are available. On the other hand, few user interface functions take them into account, so for example, windows often appear across multiple monitors.

Currently, monitor geometries are taken from Xinerama only. RandR support in this regard is yet to be done.

A “head” means each physical monitor. When there’re multiple heads, the word “screen” means the entire screen which is the combination of all heads. For example the function screen-width returns the width of the “screen” in this sense. A viewport contains the entire screen. The only exception is maximizations which are done within a head, unless stated explicitly that it’s xinerama.

Function: find-head x y

Return a ID for the display head that point (x, y) is in. The return value is an integer; the default head has ID zero. Returns nil if it cannot determine the head from x and y.

Function: head-count

Return the number of display heads on the machine.

Function: head-dimensions id

Return the cons cell (width . height) of the dimensions of the display head indicated by id. Id must be a non-negative integer. Without Xinerama support, id must be zero and the function returns the screen size.

Function: head-offset id

Return the cons cell (x . y) of the dimensions of the display head indicated by id. Id must be a non-negative integer. Without Xinerama support, id must be zero and the function returns (0 . 0).

Function: pointer-head

Return the ID of the head containing the mouse pointer.

Function: current-head #!optional window

Return the ID of the head containing the window with input focus. If window is supplied and a window, return the head containing that window. If window is supplied and nil, return (pointer-head).

Function: window-head-any-viewport window

Like current-head, this will return the ID of the head containing the specified window. But unlike current-head, window-head-any-viewport returns the head that the window would be in if its viewport were the visible viewport.

Function: current-head-dimensions #!optional window

Return a cons-cell defining the size in pixels of the current head (that containing the window window, or the pointer if window is false). Returns the screen dimensions if no such head can be identified.

Function: current-head-offset #!optional window

Return a cons-cell defining the origin of the current head (that containing the window window, or the pointer if window is false). Returns '(0 . 0) if no such head can be identified.


Next: , Up: RandR and Xinerama   [Contents][Index]