Skip to main content

Module window

Module window 

Source
Expand description

frame — the border, corners, shadow and resize edges of a window the system does not decorate. content — the card an app’s main view sits on, inside that window.

Window::window_decorations answers which of the two is in force, and it is not a target: GNOME has never implemented xdg-decoration, so a Wayland window there is told Client whatever it asked for, while the same binary under KDE or on X11 is told Server and this draws nothing. macOS and Windows always answer Server.

The window opens transparent or the band shows as a filled rect — WindowBackgroundAppearance::Opaque has the compositor paint the whole surface, corners included.

ⓘ
window::frame(self.content(window, cx), window, cx)

Functions§

content
The element an app’s main view is drawn in.
content_fill
The one colour content shows, chrome included, for an element inside it that has to cover what is under it in the same colour.
frame
Wrap a window’s root in the frame it owes.
live
Whether edge resizes: none of the sides it touches is flush.
resize_edge
Which edge a press at pos resizes, or None for a press on the content.
resting
A floating content card sitting back, beside a raised one: the same corners and border, Theme::content_resting_bg over the chrome, and no shadow.
resting_fill
content_fill for a resting card.