All Manuals > CAPI User Guide and Reference Manual > 4 General Considerations

4.3 Support for multiple monitors

CAPI supports positioning (and querying the position of) windows on multiple monitors.

The function screen-monitor-geometries supports the notion of monitor geometry. The monitor geometry includes "system" areas such as the macOS menu bar and the Microsoft Windows task bar.

The functions screen-internal-geometries and pane-screen-internal-geometry support the notion of internal geometry. The internal geometry excludes the system areas.

There is a "primary monitor" which displays any system areas. The origin of the coordinate system (as returned by top-level-interface-geometry and screen-internal-geometry) is the topmost/leftmost visible pixel of the primary monitor. Thus the origin may be in a system area such as the macOS menu bar.

The function virtual-screen-geometry returns a rectangle just covering the full area of all the monitors associated with a screen.

Note that code which relies on the position of a window should not assume that a window is located where it has just been programmatically displayed, but should query the current position. This is because the geometry includes system areas where CAPI windows cannot be displayed. For more information about this see 7.2 Resizing and positioning.

Note also that CAPI does not currently support multiple desktops, which are called workspaces in Linux distros, and called Spaces on macOS.

CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:17